GytisJDM Posted May 19, 2012 Share Posted May 19, 2012 I have edited one resource and previously it worked but today i have some problems. Here server log : [2012-05-19 15:01:21] Server started and is ready to accept connections! [2012-05-19 15:01:21] Type 'help' for a list of commands. [2012-05-19 15:02:43] CONNECT: Gytis-JDM connected (IP: xx.x.x.x.x Serial: xxxx Version: 1.3.0-9.03916.0) [2012-05-19 15:02:46] JOIN: Gytis-JDM joined the game (IP: xx) [2012-05-19 15:02:49] WARNING: [gamemodes]\gangwars\login_panel_s.lua:70: Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean] [2012-05-19 15:02:49] WARNING: [gamemodes]\gangwars\login_panel_s.lua:71: Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean] [2012-05-19 15:02:49] WARNING: [gamemodes]\gangwars\login_panel_s.lua:72: Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean] [2012-05-19 15:03:02] QUIT: Gytis-JDM left the game [[color=#FF0000]Timed out[/color]] [2012-05-19 15:03:02] WARNING: [gamemodes]\gangwars\spawn_panel_s.lua:145: Bad argument @ 'destroyElement' (i won't edited these lines): function quitPlayer() local playername = getPlayerName(source) destroyElement(blipPlayers[playername]) local theAccount = getPlayerAccount(source) setAccountData(theAccount, "money", getPlayerMoney(source)) end addEventHandler("onPlayerQuit", getRootElement(), quitPlayer) Link to comment
Alpha Posted May 19, 2012 Share Posted May 19, 2012 There is no getAccountData in the code you posted, post the code where the error occurs. Link to comment
GytisJDM Posted May 19, 2012 Author Share Posted May 19, 2012 Oh sorry forgot that one: function getSavePassword(Login) local playerAccount = getAccount(Login) local getSavePassword = getAccountData(playerAccount, "savePassword") local Password = getAccountData(playerAccount, "password") if (getAccountData(playerAccount, "serial") == getPlayerSerial(getPlayerFromName(Login))) then if (getSavePassword == true) then triggerClientEvent("addPassword", getRootElement(), Password, Login) end end end addEvent("getSavePassword", true) addEventHandler("getSavePassword", getRootElement(), getSavePassword) Link to comment
Stanley Sathler Posted May 19, 2012 Share Posted May 19, 2012 The log says: "Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean]". It means your variable "playerAccount" have a boolean value. And "getAccount()" function returns false when the account data (username and password) can not be found. So, maybe your username and password can not be found. Link to comment
GytisJDM Posted May 19, 2012 Author Share Posted May 19, 2012 The log says: "Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean]". It means your variable "playerAccount" have a boolean value. And "getAccount()" function returns false when the account data (username and password) can not be found. So, maybe your username and password can not be found. maybe but my error is when i connect to server game restarts.... you can see in server log my TIMEOUT Link to comment
GytisJDM Posted May 19, 2012 Author Share Posted May 19, 2012 This what happen when i connect to server: Sry for double post;/ Link to comment
Anderl Posted May 19, 2012 Share Posted May 19, 2012 Since he is using getAccount, getPlayerAccount is not needed. Link to comment
Castillo Posted May 19, 2012 Share Posted May 19, 2012 @GytisJDM: You're trying to get the "serial" and "password" default data? if so, then you can't do that. Link to comment
GytisJDM Posted May 19, 2012 Author Share Posted May 19, 2012 Anyway i fixed these bugs.. Thanks for help.. 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