Jump to content

How to manage flags


IIYAMA

Recommended Posts

  • Moderators

I have a problem with manage flags. After I store them in a table they got changed to a number and I can't use them any more. Even if I change them to a string, I also have to change them back to a number to use them again.

  
addEventHandler( "onResourceStart", resourceRoot, 
function () 
        flagSetInData(33,1,0x000010) 
end) 
  
local flagState = {"pro","std","poor"} 
function flagSetInData(weapon,state,flag) 
    setWeaponProperty(weapon,flagState[state],flag) 
end 

Bad argument @ 'setWeaponProperty' [Expected weapon-property at argument 3, got number '32']
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...