if then question

I have an array filled with 1s and 0s. When I test each I find that 0 seems act as a true? For example:

Seems to always give a true for a value of 1 or 0.

if next\_shape[1][c][r] then
...


    
    
    Where the following is true only for 1
    
    
    
        if next\_shape[1][c][r] == 0 then
        ...
    
     [import]uid: 98652 topic\_id: 18980 reply\_id: 318980[/import]

Well in Lua any VALUE is considered as true!
Only [lua]false[/lua] and [lua]nil[/lua] are the false values [import]uid: 64174 topic_id: 18980 reply_id: 73096[/import]

Thanks for the reply. This seems to be the case from my observations. It’s good to confirm with someone else. It’s different from other languages. [import]uid: 98652 topic_id: 18980 reply_id: 73097[/import]