01 | a = script.Votingstatus 1. Value |
02 | b = script.Votingstatus 2. Value |
03 | c = script.Votingstatus 3. Value |
04 |
05 | if a > b and a > c then |
06 | print "a wins" |
07 | elseif |
08 | b > a and b > c then |
09 | print "b wins" |
10 | elseif |
11 | c > a and c > b then |
12 | print "c wins" |
13 | elseif |
14 | print "?" then |
15 | end |
The piece of code won't detect the value of the IntValue
Votingstatus1, 2, and 3 is the IntValue
Well one problem I see would be you putting the comparison statement under the "elseif" instead of on the same line, and the "then" should also be on the same line.
Another problem I see is the last "elseif" should be else.
Here the corrected code:
01 | local a = script.Votingstatus 1. Value |
02 | local b = script.Votingstatus 2. Value |
03 | local c = script.Votingstatus 3. Value |
04 |
05 | if a>b and a>c then |
06 | print "a wins" |
07 | elseif b>a and b>c then |
08 | print "b wins" |
09 | elseif c>a and c>b then |
10 | print "c wins" |
11 | else |
12 | print "?" |
13 | end |