Jump to content

Help with two errors..


Recommended Posts

Posted

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) 

Posted

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) 

Posted

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.

Software Engineer & Entrepreneur Running Lustrel and VilarikA • Highly engaged on open source community

Posted
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

Posted

Since he is using getAccount, getPlayerAccount is not needed.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

@GytisJDM: You're trying to get the "serial" and "password" default data? if so, then you can't do that.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...