This repository was archived by the owner on Aug 16, 2024. It is now read-only.
Repository navigation
If Statements
JXSnack edited this page Apr 2, 2023
·
2 revisions
Creating if statements is really easy. Everything that is after an if statement will be part of that if statement.
If statements can only be executed in a function or check. Not in variables! If you want to use variables in if statements or checks, put a v: infront of the variable!
"functions": {
"foo_check": {
"args": {},
"execute": [
["if", "v:foo", "is", 5],
["log", "Wow! Foo is really cool right now"],
["end"]
]
}
},You can also expand the if statement by using the else or elif command.
"functions": {
"foo_check": {
"args": {},
"execute": [
["if", "v:foo", "is", 5],
["log", "Wow! Foo is really cool right now"],
["elif", "v:foo", "is", 10],
["log", "Whoa, that's a really large foo!"],
["end"]
]
}
},Elif needs argument like if
"functions": {
"foo_check": {
"args": {},
"execute": [
["if", "v:foo", "is", 5],
["log", "Wow! Foo is really cool right now"],
["else"],
["log", "Foo is not 5 right now!"],
["end"]
]
}
},Else doesn't have any arguments, but also needs to be in an if or elif.
"functions": {
"foo_check": {
"args": {},
"execute": [
["if", "v:foo", "is", 5],
["log", "Wow! Foo is really cool right now"],
["elif", "v:foo", "is", 10],
["log", "Whoa, that's a really large foo!"],
["elif", "v:foo", "is", 8],
["log", "Medium sized foo"],
["elif", "v:foo", "is", 3],
["log", "Small sized foo"],
["else"],
["log", "Foo isn't 10, 8, 5 or 3"],
["end"]
]
}
},Support, issues or feature requests? Click here
- Settings
- Custom theme (coming soon)
- Project
- Creating project (coming soon)
- Open project (coming soon)
- Bookmark project (coming soon)
- Editor
- Buttons (coming soon)
- Scenes (coming soon)
- Texts (coming soon)
- Build/play Game (coming soon)