Jump to content

Problem with markers


Kenix

Recommended Posts

So i have problem with markers:

addEventHandler("onGamemodeMapStart", root,  
    function( startedMap ) 
        local general_marker = getElementsByType ("Capture_marker") 
        for i,v in ipairs(general_marker) do 
            markerPssing[i] = createMarker(getElementData( v,"posX"),getElementData( v,"posY"),getElementData( v,"posZ"),"cylinder",1.5,153,77,39,255) 
        end 
        addEventHandler("onMarkerHit",root, 
            function( player, dim ) 
                if source == markerPassing[1] then 
                    outputChatBox("1") 
                elseif source == markerPassing[2] then 
                    outputChatBox("2") 
                elseif source == markerPassing[3] then 
                    outputChatBox("3") 
                elseif source == markerPassing[4] then 
                    outputChatBox("4") 
                else 
                    outputChatBox("error") 
                end 
            end 
        ) 
    end 
) 
  

Debug:ERROR: zombie_mod\core_server.lua:5: attempt to index global 'markerPassing' (a nil value)

But if i not use variable "markerPassing" markers are create and not write errors.

Thx in advance.

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