Hi, when I start my script and write a command (testmeme) it says:
[17:57:34] ERROR: Database query failed: no such column: spawn
[17:57:34] WARNING: basic.lua: Bad argument @ 'outputChatBox' - Line: 22
Here's my script:
function joinHandler()
local x = 1959.55
local y = -1714.46
local z = 10
spawnPlayer(source, x, y, z)
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox("Welcome to My Server", source)
executeSQLCreateTable ( "player", "accountName TEXT, spawn INTEGER" )
end
addEventHandler("onPlayerJoin", getRootElement(), joinHandler)
function saveMe(player)
local x, y, z = getElementPosition (player)
pName = getPlayerName(player)
executeSQLUpdate ( "player", "spawn = x, y, z", "accountName = pName" )
end
addEventHandler ("OnPlayerQuit", getRootElement(), saveMe)
function testMe(player)
result = executeSQLSelect( "player", "spawn", "accountName= pName")
outputChatBox(result, player)
end
addCommandHandler("testmeme", testMe)
Thanks