Management Karbust 4881 Posted July 11, 2015 Management Share Posted July 11, 2015 Hello, I would like to open my test server just to some selected persons, but they need a key that they receive when registered... I did a quest like this: quest testsv begin state start begin when login with is_test_server() and pc.getqf("testsv") == 0 begin local query = "SELECT key_testsv FROM account.account_teste WHERE login = '"..pc.get_account().."' LIMIT 1" say("Insere a senha:") local key = tonumber(input()) if tostring(key) == tostring(query) then pc.setqf("testsv", 1) else say("Senha incorreta...") end end end end But doesn't work, someone could give me a hand? Thanks, King Regards Link to comment Share on other sites More sharing options...
Remix 45 Posted July 11, 2015 Share Posted July 11, 2015 Maybe you should run the query. Link to comment Share on other sites More sharing options...
Management Karbust 4881 Posted July 11, 2015 Author Management Share Posted July 11, 2015 I already tried this sometime ago: local query = mysql_query("SELECT key_testsv FROM account.account WHERE login = '"..pc.get_account().."' LIMIT 1") But isn't working... Link to comment Share on other sites More sharing options...
Remix 45 Posted July 11, 2015 Share Posted July 11, 2015 Try this: local query = mysql_query("SELECT key_testsv FROM account.account WHERE login = '"..pc.get_account().."' LIMIT 1")[1][1] Link to comment Share on other sites More sharing options...
Active Member Koray 1994 Posted July 12, 2015 Active Member Share Posted July 12, 2015 (edited) local query = mysql_query("SELECT key_testsv FROM account.account WHERE id = '"..pc.get_account_id().."' LIMIT 1") Edited July 12, 2015 by Koray Link to comment Share on other sites More sharing options...
Management Karbust 4881 Posted July 12, 2015 Author Management Share Posted July 12, 2015 Try this: local query = mysql_query("SELECT key_testsv FROM account.account WHERE login = '"..pc.get_account().."' LIMIT 1")[1][1] Not working :S local query = mysql_query("SELECT key_testsv FROM account.account WHERE id = '"..pc.get_account_id().."' LIMIT 1") Not working too... syserr of the first option: SYSERR: Jul 12 22:40:32 :: RunState: LUA_ERROR: [string "testsv"]:1: attempt to index field `?' (a nil value) SYSERR: Jul 12 22:40:32 :: WriteRunningStateToSyserr: LUA_ERROR: quest testsv.start click syserr of the second option: SYSERR: Jul 12 22:54:49 :: operator(): QUEST NOT END RUNNING on Login/Logout - testsv SYSERR: Jul 12 22:54:51 :: Input: no quest running for pc, cannot process input : 57711 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now