[Solved] Set two values in a conditional LUA statement


Hi all,

I am working on a script that will take a user input and set some hidden values. In particular, I would like it to set two values. I can get it to work with one value, but not two. Here is the working code:


id= 2;

if getvalue(id) == “Blue” then setvalue(8,”Blue”)

When I try to make it set two values, it does not work:

id= 2;

if getvalue(id) == “Blue” then (setvalue(8,”Blue”) and setvalue(9,”Color”))

Any suggestions on how to fix this?

Anthony Schmidt selected answer

    Best answer


    The solution was really simple!

    id= 2;

    if getvalue(id) == “Blue” then (setvalue(8,”Blue”) setvalue(9,”Color”))

    No need to include “and”.

    Anthony Schmidt selected as best answer


      Question stats

      • Active
      • Views502 times
      • Answers1 answer
      • Followers1 follower