Skip to content

If Statement

8-BIT-DEV edited this page Mar 1, 2019 · 4 revisions

The If Statement A Important Part of Every Coding Language This Page Will Cover How To Use The If Statement In RedScript

Basic Syntax: if ("var1" == "33") echo "Hello World" end if

Note That This Is An Int Variable

With Int's You May Check If It Is Greater Of Lesser

Greater Syntax: if ("var1" >> "3") echo "Hi" end if

Lesser Syntax: if ("var1" << "6") echo "Hello" end if

Now To Avoid Java Errors You Will Need To Add The Parentheses Or You Will Get The Java Error

Exception in thread "main" java.lang.NumberFormatException: For input string: "Type:CloseParameter" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at red.compiler.Compiler.Compile(Compiler.java:186) at red.compiler.Compiler.createCompile(Compiler.java:40) at red.compiler.Tokenizer.createToken(Tokenizer.java:215) at red.compiler.Tokenizer.(Tokenizer.java:29) at red.compiler.RedScript.enterPath(RedScript.java:22) at red.compiler.RedScript.(RedScript.java:8) at red.compiler.RedScript.main(RedScript.java:12)

The Error May Vary Between If Statements

Clone this wiki locally