• Whats wrong with this function
    4 replies, posted
[CODE]function GM:OnRoundStart(ply) ply:StripWeapon('weapon_zm_improvised') ply:Give('weapon_ttt_lightsaber') ply:SelectWeapon('weapon_ttt_lightsaber') end[/CODE] Error:[ERROR] addons/pointshop-master/lua/items/weapons/saber.lua:24: attempt to index global 'GM' (a nil value) 1. unknown - addons/pointshop-master/lua/items/weapons/saber.lua:24 Note: That the Top line is 24
"GM" runs before the gamemode is initialized. Change it to "GAMEMODE".
[QUOTE=wauterboi;41819370]"GM" runs before the gamemode is initialized. Change it to "GAMEMODE".[/QUOTE] I did and it still caused an error
It gave the exact same error? [editline]12th August 2013[/editline] Is this being ran serverside or clientside? It should be serverside.
[QUOTE=wauterboi;41819390]It gave the exact same error? [editline]12th August 2013[/editline] Is this being ran serverside or clientside? It should be serverside.[/QUOTE] serverside but i got it fixed it turned out i never needed it but thanks for helping though
Sorry, you need to Log In to post a reply to this thread.