Jump to content

Help needed


AJXB

Recommended Posts

Hey i got this script, it give a console error: Exp.lua:7: attempt to perform arithmetic on local 'lvls'

        local pAccount = getPlayerAccount( pPlayer ) 
        local exp = getAccountData(pAccount, "exp") 
        local exps = tonumber(getAccountData(pAccount, "exp")) 
        local lvls = tonumber(getAccountData(pAccount, "lvl")) 
        local needexp = lvls * 4   ----------- this is line 7 
        if not exp then 
            setAccountData(pAccount, "exp", 1) 
            setAccountData(pAccount, "allexp", 1) 
            setAccountData(pAccount, "lvl", 1) 
            outputChatBox("Your experience: " .. exps .. "/" .. needexp, getRootElement(), 0, 255, 0) 
        else 

Someone help

This is the part that it have the error

Link to comment

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