Hiya could someone help me with this? I have a array that is looped thru using array.shift to see which item first thru last is in each space. Then I have a if state ment that checks weather what was returned wasn't nil or "" But some how when I get to thru every item in the array the if statement still lets me thru. But if I print the value of the array there is nothing there nor does it come up nil. Here is what my code looks like to give an idea.
EDIT: I guess a better explination of what I need help with is that I don't want to have the if statement at the top be true once ive shifted every element in the array.
Code:
str_temp = @attacks_str.shift
if @attacks_str != nil or @attacks_str != ""
#medium Strength hit
if str_temp == 1
actor_attack_effect($ATTACK, 2)
end
#Strong Stength hit
if str_temp == 2
actor_attack_effect($ATTACK_HIGH, 4)
end
#Weak Stength hit
if str_temp == 3
actor_attack_effect($ATTACK_WEAK, 6)
end
end
EDIT: I guess a better explination of what I need help with is that I don't want to have the if statement at the top be true once ive shifted every element in the array.