Jump to content

getElementType problem


zocken212

Recommended Posts

Hey all

I want to make a firefighter job but I have a problem. Since createFire returns no element I used particle_objects to make a fire object. Now when I'm aiming on it it always says "Error: Expected element at argument 1, got boolean".. (I created the fires before in another part)

addEventHandler("onPlayerTarget",getRootElement(), 
function (hitElement) 
    if getElementType(hitElement) == "object" then -- Error: Expected element at argument 1, got boolean 
        if getElementData(hitElement,"fire") == true then 
            outputChatBox("This is a fire") 
        end 
    end 
end) 

Where is my problem??

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