Jump to content

[Solved]


undefined

Recommended Posts

addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", root, 
function ( theKiller ) 
local h = getTime() 
    if h > 20 or h < 6 
        if theKiller then 
                addPlayerEXP( theKiller, math.random(120, 200 )) 
            else 
                addPlayerEXP( theKiller, math.random(30, 60 )) 
            end 
        end 
    end 
) 

Error

SCRIPT ERROR: Jack/exp.lua:6: 'then' expected near 'if' 

Edited by Guest
Link to comment

You're missing a 'then' at line 5, as the error suggests.

addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", root, 
function ( theKiller ) 
local h = getTime() 
    if h > 20 or h < 6 
        if theKiller then 
                addPlayerEXP( theKiller, math.random(120, 200 )) 
            else 
                addPlayerEXP( theKiller, math.random(30, 60 )) 
            end 
        end 
    end 
) 

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