whats wrong with this line of code

[blockcode]
if swipe[1] == “right” and (mov1 % 7 ~= 0) then mov2 = mov1 + 1 end
[/blockcode]
just before this line i have print( swipe[1] ) which returns right
and print(mov1%7) which returns 1

i also have this code that just above that but it works fine

[blockcode]
if swipe[1] == “up” and mov1 > 7 then mov2 = mov1 - 7 end
if swipe[1] == “down” and mov1 < 57 then mov2 = mov1 + 7 end
[/blockcode]

i also tried separating the if statement into 2 if statements with a print between them and it doesnt seem to get past the first one

this is how it looks separated
[blockcode]
if swipe[1] == “right” then
print( "swipe[1] = "…swipe[1])
if (mov1 % 7) ~= 0 then
print( "mov1 % 7 = "…mov1%7 )
mov2 = mov1 + 1
end
end
[/blockcode]
i have a print just above this that return right but the print on line 2 never prints [import]uid: 7911 topic_id: 14394 reply_id: 314394[/import]

possible hidden characters in swipe[1]? Perhaps a space attached to the end somwhere? Try this:

print("[" … swipe[1] … “]”) and see if there is something funky in swipe[1] that you’re not expecting.

[import]uid: 19626 topic_id: 14394 reply_id: 53197[/import]

yeah i thought of that also but theres no hidden char.
heres the print line from termial

------------> rigth: 2 3

and this is the print statement im using

print("------------> “…swipe[1]…”: "…swipe[2], swipe[3])

im only checking swipe[1]
swipe[2] and swipe[3] is the position the swipe started [import]uid: 7911 topic_id: 14394 reply_id: 53199[/import]

is right supposed to be spelled “rigth”?
[import]uid: 19626 topic_id: 14394 reply_id: 53201[/import]

stupid me been looking at this all morning even checked spelling several times
thanks that fixed it [import]uid: 7911 topic_id: 14394 reply_id: 53206[/import]