Jump to content

WARNINGS&ERRORS


Recommended Posts

    createBlip ( 1125.5, 1285.0999755859, 12.800000190735, 41 ) 
    local thegate = createObject(3095, 1125.5, 1285.0999755859, 12.800000190735, 270, 179.87524414063, 179.87524414063) 
    local Marker = createMarker(1125.9000244141, 1285.0999755859, 9.8000001907349, "cylinder", 6, 255, 0, 0, 0) 
  
    function hitmyelement(hitPlayer,thePlayer) 
         local accName = getAccountName ( getPlayerAccount ( thePlayer ) )      -- here's the 2 warnings .. what's the problem 
         if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- and here's the error 
         moveObject(thegate, 1000, 1125.5, 1285.0999755859, 20.799999237061) 
    end 
    end 
    addEventHandler('onMarkerHit', Marker, hitmyelement) 
      
    function leavedoor(leavePlayer) 
         moveObject(thegate, 1000, 1125.9000244141, 1285.0999755859, 12.800000190735) 
    end 
    addEventHandler('onMarkerLeave', Marker, leavedoor) 

debugscript says:

WARNING : 6 : bad argument @ 'getPlayerAccount' [Expected element at argument 1, got boolean

WARNING : 6 : bad argument @ 'getPlayerAccount' [Expected element at argument 1, got boolean

ERROR:7: attempt to concatenate local 'accName (a boolean value)

Link to comment
Have you idea to make it in different groups TAPL ?

You means make it for two groups or more? if so

createBlip(1125.5, 1285.0999755859, 12.800000190735, 41) 
local thegate = createObject(3095, 1125.5, 1285.0999755859, 12.800000190735, 270, 179.87524414063, 179.87524414063) 
local Marker = createMarker(1125.9000244141, 1285.0999755859, 9.8000001907349, "cylinder", 6, 255, 0, 0, 0) 
  
function hitmyelement(hitPlayer) 
     local accName = getAccountName(getPlayerAccount(hitPlayer)) 
     if isObjectInACLGroup("user."..accName, aclGetGroup("Moderator")) or isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then 
          moveObject(thegate, 1000, 1125.5, 1285.0999755859, 20.799999237061) 
     end 
end 
addEventHandler('onMarkerHit', Marker, hitmyelement) 
      
function leavedoor(leavePlayer) 
     moveObject(thegate, 1000, 1125.9000244141, 1285.0999755859, 12.800000190735) 
end 
addEventHandler('onMarkerLeave', Marker, leavedoor) 

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