Jump to content

bad pointers


Recommended Posts

hi. i'm trying to do something in nightlys and i have one question. Simple script with 'onMarkerHit' event:

gResRoot = getResourceRootElement( getThisResource() ); 
  
addEventHandler( "onResourceStart", gResRoot, 
    function () 
        idlewood = createMarker( 2073.9887, -1831.4984, 13.5468, "cylinder", 2.5, 0, 255, 0, 50 ); 
        addEventHandler( "onMarkerHit", idlewood, 
            function ( player ) 
            local vehicle = getPedOccupiedVehicle( player ); 
            if vehicle then 
                if isGarageOpen( 8 ) == false then 
                    setGarageOpen( 8, true ); 
                else 
                    setGarageOpen( 8, false ); 
                end 
            end 
            end 
        ) 
    end 
) 

when i'm hitting the marker im getting a warning 'bad ped pointer' in line getPedOccupiedVehicle( player );.

There were not errors like this one in dp-s.. so, whats my mistake?

Edited by Guest
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...