Ok so I'v been messing around with the code for gmod stranded and I'v made a Diamond Resource and a Ref. Diamond Resource. I'v also made a AdvWorkbench and AdvFurnace. For some reason everytime I try to play it in single player I get this
Timer Error: [gamemodes\gmstranded\gamemode\cl_init.lua:418] attempt to compare number with nil
I Looked at the code and it looks fine to me. Anyone help.
[Code]
/*---------------------------------------------------------
Needs
---------------------------------------------------------*/
function GM.SetNeeds(um)
Sleepiness = um:ReadShort()
Hunger = um:ReadShort()
Thirst = um:ReadShort()
end
usermessage.Hook("gms_setneeds",GM.SetNeeds)
function GM.DecNeeds()
if Sleepiness > 0 then Sleepiness = Sleepiness - 1 end
if Thirst > 0 then Thirst = Thirst - 3 end
if Hunger > 0 then Hunger = Hunger - 1 end
timer.Simple(1,GAMEMODE.DecNeeds)
end
timer.Simple(1,GM.DecNeeds)
[/Code]
Also when I play it shows the Q menu but not the panel on the left with all the skills, resources, and how much heath, hunger, and thirst. I think it has to do with the code but I don't know how to fix it.
Does it work fine in multiplayer?
[QUOTE=Nerdeboy;35080679]Does it work fine in multiplayer?[/QUOTE]
I don't know Iv been testing it only in single player.
[editline]10th March 2012[/editline]
I also for some reason spawn with SMG, Grenade, Pistol and stunstick.
Probably because it hasn't been made to run in singleplayer. Try running a LAN listen server to test it instead.
[QUOTE=Nerdeboy;35083430]Probably because it hasn't been made to run in singleplayer. Try running a LAN listen server to test it instead.[/QUOTE]
No that wasn't the problem, I got it, it was because I never put in init.lua to tell it that it can make weapons.
Sorry, you need to Log In to post a reply to this thread.