Okay, so i'm making an action script, and i'm trying to make it knight only.. but i have tried many different ways, and never got anywhere.. The part i added to check vocation is as follows ( i tried a lot of different ways )
the code to go with the local voc
the thing with that code is in the local variable i created ( local voc = *** ) it only takes effect and cancels the first voc listed in this case ( 1 ) ... if i use a voc such as voc ( 5 ) then it works just fine? so the local variable only seems to be recognizing the first nearest number to the =...
the second way i tried was..
the same as before, in the second one it only registers the first voc i chose.. so i don't understand how to get it to register every voc listed in the array/ variable. I'm confused.... Just trying to make a knight only rune -.-'
Code:
local voc = 1, 2, 3, 5, 6, 7, 9, 10, 11
Code:
if voc == getPlayerVocation(cid) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, error_voc)
return 0
end
the thing with that code is in the local variable i created ( local voc = *** ) it only takes effect and cancels the first voc listed in this case ( 1 ) ... if i use a voc such as voc ( 5 ) then it works just fine? so the local variable only seems to be recognizing the first nearest number to the =...
the second way i tried was..
Code:
if (getPlayervocation(cid) and isInArray({1, 2, 3, 5, 6, 7, 9, 10, 11}) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, error_voc)
return 0
end
the same as before, in the second one it only registers the first voc i chose.. so i don't understand how to get it to register every voc listed in the array/ variable. I'm confused.... Just trying to make a knight only rune -.-'