sos Posted January 27, 2008 Share Posted January 27, 2008 function lg ( thePlayer, commandName,ac,ps) p = tostring(ps) logIn( thePlayer,ac,ps) outputChatBox(ac.." "..ps) end addCommandHandler ( "lg", lg ) ----- WARNING: commands.lua: Bad argument @ 'logIn' - Line: 109 Please help That I do not so? Link to comment
szlend Posted January 27, 2008 Share Posted January 27, 2008 (edited) In your function you have "commandName" which is never used. Assuming that you type "/lg user pass" in the chatbox, that will set: commandName = user, ac = pass, leaving "ps" empty. Try removing commandName from your function Edit: Nevermind, commandName is the name of the command my bad Edited January 27, 2008 by Guest Link to comment
sos Posted January 27, 2008 Author Share Posted January 27, 2008 I think CommandName need for make my command. But i remove commandsName and nothing happend. i think trouble in logIn operator but where I do not know... Link to comment
chiefwhosm Posted January 27, 2008 Share Posted January 27, 2008 logIn ( player thePlayer, account theAccount, string thePassword ) Okay I had a go with this only yesterday, and got it to work once (then it broke itself) What I did was I made an auto-login function which was to auto ban people. all the function did was: function logMeIn() login Console, Console, Password end addEventHandler "onResourceStart", getRootElement Now for this to work it needs to have an account. So I edited the accounts.xml file and added a password to the Console user. Then tested it on the server, and it did work (once). I then went back and discovered it had added another user called Console without a password, hence why it had stopped working. Therefore I would try something similar but with a static made account, and see what happens (in my case I think I pretty much made an everyone is admin script by mistake). Chief. 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