• Null value, ply?
    8 replies, posted
[CODE]function changejob( paycheck, number, ply ) ply:SetNetworkedInt( "paycheck", paycheck ) <---- line 72 ply:SetTeam( number ) end[/CODE] Gave me this error? [CODE][gamemodes\legendscript\gamemode\init.lua:72] attempt to index local 'ply' (a nil value)(Hook: PlayerInitialSpawn)[/CODE] Help please!
the specified player does not exist... Be sure you are giving the function valid values.
Where are you calling it from?
[QUOTE=ralle105;25016188]Where are you calling it from?[/QUOTE] [QUOTE][code](Hook: PlayerInitialSpawn)[/code][/quote] Either you have no Idea what you are doing, or you messed/missed a/with the variable/s
Commander - I never actually wrote the hook, I just called it under the function GM:PlayerInitialSpawn( ply ) Ralle - I think what your asking is where do I actually run the function, and that is in GM:PlayerInitialSpawn( ply ) Wizard - Please explain!
Post your PlayerInitialSpawn hook then
changejob( 50, 1 ) Is that what you asked for? Thats the code inside of GM:PlayerInitialSpawn
changejob( 50, 1, ply )
[QUOTE=Jamie932;25019899]changejob( 50, 1, ply )[/QUOTE] Ugh, thanks. I really need a dumbass filter! XD
Sorry, you need to Log In to post a reply to this thread.