Bully-Board

Bully Modding Section => Modding Questions/Help => Topic started by: mhdt on July 22, 2021, 11:29:35 PM

Title: Judge multiple variables
Post by: mhdt on July 22, 2021, 11:29:35 PM
Code: [Select]
if a ~= 1 and b ~= 2 and c ~= 3 thenI always write like this, but it is very troublesome. Is there an easier way?
Title: Re: Judge multiple variables
Post by: Ming on July 27, 2021, 12:04:35 AM
不知道這樣有沒有用
I don't know it can work or not
Code: [Select]
local abc = {{a}, {b}, {c}}
ming = 1, table.getn(abc)
if abc[ming] ~= 3 then
Title: Re: Judge multiple variables
Post by: mhdt on July 27, 2021, 04:31:22 AM
It looks like
Code: [Select]
a ~= 3 or c ~= 3