Jump to content

PLEASE HELP setTimer


rublisk19

Recommended Posts

Posted

i have problem with script what add money every 10sec

function addMoney () 
    setElementData(source, "rpg.money", getElementData(source,"rpg.money") +10) 
end 
setTimer ( addMoney, 10000, 0) 

server error:

attempt to perform arithmetic on a boolean value.

Posted
setTimer( 
    function() 
        for index, player in next, getElementsByType 'player' do 
            setElementData(player, 'rpg.exp', getElementData(player, 'rpg.exp') + 10) 
        end 
    end, 
    10000, 0 
) 

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...