Started coding (Newbie question)

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

ma2Wolf

all round stupid imbecile
Feb 7, 2002
22
0
0
Manchester, England
Visit site
I am really new to coding and always seem to get errors when i hit the compile button. I need help starting out. I tried to make the Quadshot once but my computer crashed and went to the desktop. Anyway...I would like to know how to make a new game info where you start with no weapons. This is because i want to make a mod will only use weapons which i will make (sooner or later). If this doesn't make sense please tell me because i'm not really sure what i'm talking about to be honest :)
 

drakorg

New Member
Feb 4, 2002
6
0
0
argentina
Visit site
Originally posted by ma2Wolf
I am really new to coding and always seem to get errors when i hit the compile button. I need help starting out. I tried to make the Quadshot once but my computer crashed and went to the desktop. Anyway...I would like to know how to make a new game info where you start with no weapons. This is because i want to make a mod will only use weapons which i will make (sooner or later). If this doesn't make sense please tell me because i'm not really sure what i'm talking about to be honest :)

Hi, there is a nice tutorial for beginners at http://unreal.epicgames.com/
it explains how to compile your code, etc.

now if your problem is code related you should ask more specific questions ...
 

Call me Erdrik

Arch Mage
Nov 24, 1999
334
0
0
44
Spring Hill, FL, USA
www.geocities.com
Originally posted by ma2Wolf
...
...Anyway...I would like to know how to make a new game info where you start with no weapons. This is because i want to make a mod will only use weapons which i will make (sooner or later).
...

no need to code for this just goto info>gameinfo
and find the single player gametype. then make a new subclass.
then in the new subclass in its default properties change defualt weapon to none.
 

ma2Wolf

all round stupid imbecile
Feb 7, 2002
22
0
0
Manchester, England
Visit site
Thanks alot, i am just trying to get to grips with unrealscript. I only have access to the internet through college and so i won't be able to post replys for a week because i'll be off for half term.

I tried coding again last night... I tried to put the stinger from Unreal into UT. I copied the stinger ammo and stinger code into the ut_pickup and tournament_weapon code and i don't know what ive done wrong but it doesn't work. I'm just suck at the moment! :)

I am not going to give up though...

Later
 

jb

New Member
May 22, 2000
278
0
0
www.planetunreal.com
watch out for AccessNones when the bots dont have weapons. I tried the same thing (no weapons) but ran into issues with bots (the acccess none was part of the botpack.bot.roaming). My soultion was to give them a dummy gun (weapon with no mesh, no ammo, no nothing). However I did this using a TeamGamePlus subclass for my game. Wonderinf if Erdrik's way works in this case too....
 

ma2Wolf

all round stupid imbecile
Feb 7, 2002
22
0
0
Manchester, England
Visit site
I am really new to coding so i am not sure where to find the "AccessNone". I'm sorry is that in the bot code or the weapon code??

Please don't shout at me because i don't know anything:)

I'll try to find it tonight.

Thanks alot.

Later
 

jb

New Member
May 22, 2000
278
0
0
www.planetunreal.com
yeap Access Nones you should treat as errors. And the info that is in the log is not the best tool to find out what caused the error. Usally you get enough to find which function caused the error. But if that function is big then finding the issue because less fun. However every Uscript program has to deal with them. So welcome to Uscript :)
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
42
void
www.vovoid.com
First: Welcome to the wonderful world of UScript!
Second: I think that the stinger issue is because of the DMMutator, the default weapon mutator, but I could be wrong.
Third: I think you need some help getting started, like compiling, and coding efficiently (like, don't use UnrealEd)

If you have any questions at all, feel free to PM me...
 

Call me Erdrik

Arch Mage
Nov 24, 1999
334
0
0
44
Spring Hill, FL, USA
www.geocities.com
Originally posted by jb
yeap Access Nones you should treat as errors. And the info that is in the log is not the best tool to find out what caused the error. Usally you get enough to find which function caused the error. But if that function is big then finding the issue because less fun. However every Uscript program has to deal with them. So welcome to Uscript :)

Ive never doen this but (Im pretty lazy when it comes to access nones :p )....

you could always split up a big function into smaller functions like:


function MainPiece()
{
if (blah)
Spawn(blah);
Piece1();
}
function Piece1()
{
if (blah)
blah;
Piece2();
}
function Piece2()
{
if (blah)
blah;
Piece3();
}
function Piece3()
{
if (blah)
blah;
}

That way it will show which 'peice' of the function is giving the access none and should be easier to find tho it may be too much to split up the function :p just a thought...
 

Mychaeel

New Member
Welcome, and please use the [code]...[/code] tags for quoting source code. It preserves indentations, uses a monospaced font and thus makes your quoted code way more readable.

Ive never doen this but (Im pretty lazy when it comes to access nones)....
A neatly coded script just doesn't throw "Accessed None"s. An "Accessed None" is always an error, and the mere fact that it doesn't crash Unreal Tournament and is handled more or less gracefully by the engine doesn't mean it's less of a bug. (And it is easy enough to avoid anyway.)

Besides, every message that is written to the log slows down the game a bit (even though log output is buffered), and if your script throws tons of warnings, the impact on game speed is considerable, and it produces ridiculously huge log files and might even crash game servers.

I'm with jb---you should consider "Accessed None"s as the engine's friendly pointers to bugs that urgently need to be fixed.
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Agreed.

I hate Accessed Nones, as well as Null Pointers - their close relatives in other languages.

Mychaeel and Raeled is right though...it can cause performance drops. Negligible most of time, but that's not what matters - we're not coding chess emulators here (well, not usually). Performance is a key factor in how these games are played. Once you have gone through and cleaned out ALL of the AC's you notice the difference.

Not to mention the fact that when someone downloaded your code, they didn't expect to have a 35+ MB file generated on their hard drive when they tried it out. All it takes is one or two AC's in a tick() or a HUD function and you can easily be transerring a meg a minute down to the box.


But here's the thing - while they can be REALLY annoying to track down sometimes ... you can ALWAYS track them down. There isn't an AC out there that can't be fixed (since all you have to do is find out the cause and check for it), so there's no real excuse NOT to do so. At least for anything you actually expect the public to use.


rgx