Skip to content

If Statement

8-BIT-DEV edited this page Mar 2, 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 int ("var1" == "33") echo "Hello World" end if

Note That This Is An Int Variable And You Need Select The Type Of Variable Like if string (conditions) Or if int (conditions)

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

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

Lesser Syntax: if int ("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 Also You Need To Of The Signs That Tell RedScript How To Compare Or You Will Get The Error Listed Below

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