I get this error:
[lua]Hook 'CheckFire' Failed: autorun/Burn.lua:3: attempt to call method 'IsOnFire' (a nil value)[/lua]
and this is the code line.
[lua]function Burn()
for k,v in pairs(player.GetAll()) do
if ( v:IsOnFire() ) then
-- My code in here
end
end
end
hook.Add("Think", "CheckFire", Burn)[/lua]
and it should work.. [url]http://wiki.garrysmod.com/?title=Entity.IsOnFire[/url]
PROBLEM SOLVED
Are you sure your code is being called serverside? If the error is yellow it means it was called clientside.
Hmm, its yellow. how odd..
its from "lua/autorun/server"
Oh wait! I just found out that I forgot to put it in the "server" folder.
My Mistake! :SS
Thanks for the help! :P
Sorry, you need to Log In to post a reply to this thread.