[DKR]silverfang Posted December 20, 2008 Share Posted December 20, 2008 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 Link to comment
arc_ Posted December 23, 2008 Share Posted December 23, 2008 excuteSQLDelete("ClassTable", "player = '"..name.."'" ) You simply made a typo in the function name (excute instead if execute). Link to comment
[DKR]silverfang Posted December 24, 2008 Author Share Posted December 24, 2008 Haha, it's unbelievable how long I try and debug a script and all it is, is a damn type. Cheers Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now