I keep getting an error for the executeSQLDelete() when I try and call this script (nil value if I remember)
function deleteRecord (thePlayer, command, name)
selectedPlayer = getPlayerFromNick(name)
if (selectedPlayer) then
result = executeSQLSelect ( "ClassTable", "player, class, IP", "player = '"..name.."'" )
if (not result) then
outputChatBox("Cannot find a record for this user in the Database.", thePlayer)
else
outputChatBox("Deleted Data Nick:"..result[1][1].." Class: "..result[1][2].." IP: "..result[1][3], thePlayer)
excuteSQLDelete("ClassTable", "player = '"..name.."'" )
end
else
outputChatBox("Cannot find player, please check spelling and try again", thePlayer)
end
end
addCommandHandler("userdelete", deleteRecord, true, false)
EDIT: Oh and I've setup the table here
connect = executeSQLCreateTable ( "ClassTable", "player TEXT, class TEXT, IP TEXT" )
if (connect == false) then
outputChatBox("Could not connect to DB")
end