Jump to content

getElementInterior problem.


xeon17

Recommended Posts

Hello there,

I have a small problem with the function getElementInterior , so everything is working but only the getElementInterior have a error at argument 1 got nil.

I don't know to fix it,so please tell me what i'm doing wrong.

addEvent("goLos", true) 
addEventHandler("goLos", root, 
function() 
    if getPlayerMoney(source) >= 500 then 
        takePlayerMoney(source, 500) 
        fadeCamera ( source, false, 2.0, 0, 0, 0 ) 
        setTimer ( fadeCameraDelayed, 3000, 1, source ) 
        setTimer(theAir, 2000, 1, source) 
        setTimer( function () 
    if getElementInterior(source) == 1 then 
        fadeCamera ( source, false, 2.0, 0, 0, 0 ) 
        setTimer ( fadeCameraDelayed, 3000, 1, source ) 
        setTimer(SpawLos, 2500, 1, source) 
    end 
    end, 30000, 1, source) 
    end 
end 
) 

Regards.

Link to comment
  • Moderators

Try this:

addEvent("goLos", true) 
addEventHandler("goLos", root, 
function() 
    if getPlayerMoney(source) >= 500 then 
        takePlayerMoney(source, 500) 
        fadeCamera ( source, false, 2.0, 0, 0, 0 ) 
        setTimer ( fadeCameraDelayed, 3000, 1, source ) 
        setTimer(theAir, 2000, 1, source) 
        setTimer( function (source) 
            if getElementInterior(source) == 1 then 
                fadeCamera ( source, false, 2.0, 0, 0, 0 ) 
                setTimer ( fadeCameraDelayed, 3000, 1, source ) 
                setTimer(SpawLos, 2500, 1, source) 
            end 
        end, 30000, 1, source) 
    end 
end 
) 

Link to comment
Try this:
addEvent("goLos", true) 
addEventHandler("goLos", root, 
function() 
    if getPlayerMoney(source) >= 500 then 
        takePlayerMoney(source, 500) 
        fadeCamera ( source, false, 2.0, 0, 0, 0 ) 
        setTimer ( fadeCameraDelayed, 3000, 1, source ) 
        setTimer(theAir, 2000, 1, source) 
        setTimer( function (source) 
            if getElementInterior(source) == 1 then 
                fadeCamera ( source, false, 2.0, 0, 0, 0 ) 
                setTimer ( fadeCameraDelayed, 3000, 1, source ) 
                setTimer(SpawLos, 2500, 1, source) 
            end 
        end, 30000, 1, source) 
    end 
end 
) 

I fixed it already with help of a friend , thanks anyway for your help DNL291. Your code is correct

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