Tekken Posted June 7, 2015 Posted June 7, 2015 Why i get this error? Error: WARNING: login\login_s.lua:6: Bad argument @ 'logIn' [Expected account at argument 2, got string 'username'] Code: Server: addEvent("loginPlayer", true) addEventHandler("loginPlayer", getRootElement(), function(username,password) local acc = getAccount(username,password) if acc then logIn(source, username, password) else outputChatBox("[Login] Check username and password!", source, 255, 0, 0, true) return end end) Client: addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), function() if (source == login_but) then username = guiGetText(the_user) password = guiGetText(the_pass) if username ~= "" and password ~= "" then triggerServerEvent("loginPlayer", localPlayer, username, password) else outputChatBox("[Login] Please complet username and password!", 255, 0, 0) return end end end) Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Walid Posted June 7, 2015 Posted June 7, 2015 -- Client side addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), function() if (source == login_but) then username = guiGetText(the_user) password = guiGetText(the_pass) if username ~= "" and password ~= "" then triggerServerEvent("loginPlayer", localPlayer, username, password) else outputChatBox("[Login] Please complet username and password!", 255, 0, 0) return end end end) -- Server side addEvent("loginPlayer", true) addEventHandler("loginPlayer", getRootElement(), function(username,password) local acc = getAccount(username,password) if acc then logIn(source, acc, password) else outputChatBox("[Login] Check username and password!", source, 255, 0, 0, true) return end end) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Tekken Posted June 7, 2015 Author Posted June 7, 2015 Oh, thanks guys Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
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