noOx Posted July 17, 2009 Share Posted July 17, 2009 (edited) Hi, i have a problem with SQLite. I want to create a Whitelist with SQLite but when i join on my server it do nothing. whitelist = executeSQLSelect("whitelist", "username", "username = 'noOx'") if (whitelist == false) then -- When my Name dont exist. outputChatBox("Your Name are not on the Whitelist.", source, 200, 0, 0, true) else spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome.", source, 255, 255, 255, true) end I have already create a new table with the Firefox Extension "SQLite Manager" and changed the name to registry.db In the Table whitelist is one Record with username = blablub, but i spawn normally And sorry for my bad english, im from germany. Edited July 17, 2009 by Guest Link to comment
[DKR]silverfang Posted July 17, 2009 Share Posted July 17, 2009 DO you get any errors? Is that in a function or on it's own? Also are x, y, z declared? We cannot help you if you don't try and help us. Link to comment
noOx Posted July 17, 2009 Author Share Posted July 17, 2009 The complete Function function joinHandler() local x = 1959.55 local y = -1714.46 local z = 10 whitelist = executeSQLSelect("whitelist", "username", "username = 'noOx'") if (whitelist == false) then -- Wenn Name nicht auf der Whitelist steht outputChatBox("Dein Name steht nicht auf der Whitelist. Informiere einen Administrator", source, 200, 0, 0, true) else spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Willkommen auf dem GangLife RPG Server", source, 255, 255, 255, true) end end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) I dont get any errors ingame or in the serverconsole..that is the problem Link to comment
50p Posted July 17, 2009 Share Posted July 17, 2009 Try to use "SQLite Database Browser" application to create databases, tables inside of databases, records, etc. Maybe your database created with firefox' extension fails. Link to comment
noOx Posted July 17, 2009 Author Share Posted July 17, 2009 I have found the problem! I have deleted the ' ' around noOx, then it runs perfect 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