Ok, I know I have been away for a few months, but I can't figure out why this script is giving a SyntaxError Unexpected Token "{". I am not very good at scripting if else statements.
if ($gameVariables.value(5).includes($gameVariables.value(6)) || $gameVariables.value(5).includes($gameVariables.value(7)) {
$gameVariables.setValue(11, 1)
}
So, essentially, if the value of Variable 6 or 7 are included in Variable 5 then the value of Variable 11 will be given a value of 1.
I did this same thing using the Conditional Branch with a Script and it worked fine. Text was displayed depending on the outcome. This is what I used in the Conditional Branch script for the If statement:
$gameVariables.value(5).includes($gameVariables.value(6)) || ($gameVariables.value(7))
I want to have a list of values to check to see if they are included in Variable 5. But with the Conditional Branch Script, it is all on one long line and hard to see. So I tried using a Script to make a conditional branch check because you can use many lines which are easier to read.
I am trying to give Variable 11 a value that I can then check using a regular Conditional Branch to then display text. Because I haven't been able to use a Script to display text so far.