• Timer Error: \gamemode\sqlcar.lua:99: Tried to use a NULL entity!
    5 replies, posted
Lua Error: Timer Error: \gamemode\sqlcar.lua:99: Tried to use a NULL entity! The error above breaks my SQL script, what can I do against this? Line 99, is "SteamID = ply:SteamID()" [code] function PlayerInitialSpawn( ply ) timer.Create("Steam_id_delay", 1, 1, function() SteamID = ply:SteamID() ply:SetNWString("SteamID", SteamID) timer.Create("SaveStat", 10, 0, function() saveStat( ply ) end) player_exists( ply ) end) end hook.Add( "PlayerInitialSpawn", "PlayerInitialSpawn", PlayerInitialSpawn ) [/code]
just use ID and not SteamID thats shut work better or use local SteamID = ply:SteamID() that shut work the best i think
[QUOTE=MrMiniRazor;19214488]Just use ID and not SteamID thats [b]should[/b] work better. Or use: [lua] local SteamID = ply:SteamID() [/lua] That [b]should[/b] work the best, I think.[/QUOTE] Just a little helpful hint. :)
[url]http://wiki.garrysmod.com/?title=Player.SteamID[/url] Don't use a NWVar when you can just go (your player object):SteamID()
Forget all of what you just put. Use this instead.... [url]http://wiki.garrysmod.com/?title=Gamemode.PlayerAuthed[/url]
Sorry, you need to Log In to post a reply to this thread.