Platform Builder Forums
Help and Support => Working with Platform Builder => Topic started by: McPopato on May 31, 2020, 07:22:38 PM
-
I ran a hypothetical in which:
if game var A = game var B
+Functions
if game var A = 1
+FunctionsA
with both variables being equal to 1.
Only FunctionsA worked, even though they're literally the same command.
Can someone help me with this? It's making some testing fairly difficult.
-
Answered my own question.
To compare variables to one another:
if game var a = [game var b]
using
if game var a = game var b
doesn't work for some reason.
-
when you put a variable in brackets, command prompt reads its value, e.g. 1, 3, 15, and so on.
if game var a = game var b
this command doesn't work because variables can only have numerical values, and "game var b" is obviously verbal.
-
Actually conditionals are like commands. The second value must be numerical, bracketed or an special token you can search on the CP website, otherwise cp won't understand.
Any checking or setting to/with another variable or thing must use bracketings.
-
I've understood my mistake. Thank you all for your assistance regardless!
-
I've understood my mistake. Thank you all for your assistance regardless!
No problem, I am myself very happy that you are back on PB. We missed you.
-
I've understood my mistake. Thank you all for your assistance regardless!
No problem. Its good to have you back