• A lua error!
    4 replies, posted
Dont know how to fix this error. Please help [gamemodes\zombies\gamemode\chatcommands.lua:8] function arguments expected near 'local' [CODE] hook.Add( "PlayerSay", "Adds a prop spawner at the caller's location", function( ply, text, team ) if (text == "/addpropspawn") then if !ply:IsAdmin() then return "" else local POS = ply:GetPos local map = game.GetMap() local idlist = sql.QueryRow("SELECT id FROM propspawner WHERE map = '"..map.."'") local new = table.GetLastKey( idlist ) + 1 sql.Query("INSERT INTO propspawner (map, vector, id) VALUES ('"..map.."','"..POS.."','"..new.."'") return "" end end end [/CODE]
Please send us the whole code.
Bump (Ive included the whole function code in the OP)
You forgot () at ply:GetPos
You're also missing a ) at the end of the function for the hook.Add()
Sorry, you need to Log In to post a reply to this thread.