• SQLite Query, Not Working!
    1 replies, posted
[lua]function new_player( SteamID, ply ) _steamID = SteamID sql.Query( "INSERT INTO playerChars ('unique_id', 'charName')VALUES ('".._steamID.."', '".."Player".."')" ) result = sql.Query( "SELECT unique_id, charName FROM playerChars WHERE unique_id = '".._steamID.."'" ) if (!result) then Msg("Something went wrong with creating a players info !\n") end end[/lua] Here we have something slightly edited from the SQLite tutorial on maurits.tv. I know that is outdated. HOWEVER. It's the only SQLite tutorial I could find for Garry's Mod, there appear to be none for 13. The problem is, it always says "Something went wrong with creating a players info !" no matter what. So... where can I find a newer tutorial? I'm also not interested in using MySQL, SQLite is way more convenient [for me].
Try printing out the error message after you determine something has gone wrong: [url]https://wiki.garrysmod.com/page/sql/LastError[/url]
Sorry, you need to Log In to post a reply to this thread.