Moderators Citizen Posted March 7, 2011 Moderators Share Posted March 7, 2011 Yeah I forgot the return thanks The Kid but I forgot another in the line 2 The full code function setCash ( sourcePlayer,cmd,who,amount) if ( not who and not amount ) then outputChatBox("*Use /setcash [Name] [amount]", sourcePlayer, 180, 0, 0 ) return end local gived = getPlayerFromName ( who ) if not gived then outputChatBox("The player "..who.." is not connected", sourcePlayer, 180, 0, 0 ) return end account = getPlayerAccount(gived) if not isGuestAccount ( account ) then local playerCash = getAccountData ( account, "data.cash" ) local success = setAccountData ( account, "data.cash", tonumber(playerCash)+tonumber(amount) ) if success then outputChatBox ( "Your cash has been setted.", gived ) outputChatBox ( "You've setted his cash.", sourcePlayer ) else outputChatBox("ERROR: His cash his not setted", sourcePlayer, 180, 0, 0 ) end end end addCommandHandler ( "setcash", setCash ) Try this Link to comment
bartje01 Posted March 7, 2011 Author Share Posted March 7, 2011 OH MAN it finaly works!!. Thankyou so much everyone. No errors no warnings. all becaues of you guys Thanks. PS: What program are you guys using for scripting? Link to comment
Castillo Posted March 7, 2011 Share Posted March 7, 2011 I use notepad++ best program ever Link to comment
bartje01 Posted March 7, 2011 Author Share Posted March 7, 2011 OK ty. I'll download it Link to comment
Moderators Citizen Posted March 7, 2011 Moderators Share Posted March 7, 2011 Yeah Notepad++ too. Link to comment
Timic Posted March 8, 2011 Share Posted March 8, 2011 I am using SciTE for programming + compiling. Link to comment
Moderators Citizen Posted March 8, 2011 Moderators Share Posted March 8, 2011 I am using SciTE for programming + compiling. You mean in *.luac ? Link to comment
proracer Posted March 8, 2011 Share Posted March 8, 2011 I use the same tool as Timic and yeah I like it alot. Link to comment
Timic Posted March 8, 2011 Share Posted March 8, 2011 I am using SciTE for programming + compiling. You mean in *.luac ? When I compile it, it creates new file. Yeah, like *.luac Btw, it is the best =D 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