Editing Syntax

1. Click Gear in IF block
2. Insert blocks to edit syntax.
Options: If, Do, Else

IF conditions

If:Do

Syntax:

``````If [condtion]:
Do [code 1]
``````

If the condition is met, the block will run the code specified in the block. Otherwise, no code will run.

If:Do:Else

Syntax:

``````If [condtion]:
Do [code 1]
Else
Do [code 2]
``````

If the condition is met, the block will run [code 1]. If the condition is not met, the block will run [code 2.]

If:Do:ElseIf

Syntax:

``````If [condtion a]:
Do [code 1]
ElseIf [condition b]:
Do [code 2]
[...]
``````

If condition A is met, the block will run [code 1]. If condition B is met, the block will run [code 2]. If neither of the conditions are met, nothing will run.

The `ElseIf` block can be indefinitely expandable. Doing this allows you to make more conditions in the program.

Showcase: `If, Do1, ElseIf1, Do2, ElseIf2, Do3, [...]`

If:Do:ElseIf:Else

Syntax:

``````If [condtion a]:
Do [code 1]
ElseIf [condition b]:
Do [code 2]
[...]
Else
Do [code 3]
``````

If condition a is met, run code 1. If condition b is met, run code 2 [and so on.] If neither conditions are met, run code 3.

Comparison Values

Equals

If the value on the left side is the same as the value on the right side, the condition will be true.

True: 3=3
False: 2=5

Does Not Equal

If the value on the left side is NOT the same as the value on the right side, the condition will be true.

True: 3 does not equal 5
False: 2 does not equal 4

Less Than

True if the left value is smaller than the right value. Cannot be Equal.

True: 3<5
False: 2<1

Greater Than

True if the left value is larger than the right value. Cannot Be Equal.

True: 5>3
False: 2>3

Less/Greater Than or Equals

These relational operators allow the condition to be true if it is equal as well.

Boolean Operators

AND

Both conditions must be true for the condition to be met.

Example:

true AND true = true, true AND false = false

OR

Only one must be met for the condition to be true.

Example:

true OR true = false, true OR false = true, false OR false = false.

True / False

This expression will guarantee a true or false outcome based on the block selected.

1 Like

Didn’t someone already make something like this?

1 Like

It’s similar but it shows what basic operations can be done in the code menu.

Well, nice guide anyway! It’ll help non-experienced gims!

1 Like

Nice guide! This will also be very helpful for new users.

1 Like

Nice guide!

1 Like

Bumping the topic>.
yay