Tophatguard.com games tools login

VLScript Wiki

VLScipt as said in the github page's description "A script compiler and runner for valleyos". That is very true. It is a script compiler and runner and no it will not bake a cake for you. Unless you download the source code and program it to bake a cake for you. Anyway time for the documentation.

For the first token I will cover, It is the

shush

token (that was a copy-paste section, not a button by the way) which is the equivelent to echo off in batch. So you need to put that in the beginning of every script unless you like that wierd command repeating stuff. Because RNBC compiles to batch with .rnb instead of .bat so many logical features from batch are also in VLScript.

Next I will cover if statements. If statements are weird than when you accidentally delete your OS and the USB you're booting from when you're trying to install a new OS. Pinnacle of programming. But if it ain't broken, don't fix it. So basically if statements are the same as in batch, but variables, and variables anywhere do not need %'s wrapped around them. If statements take a variable, the thing to do with them, AKA ==, =>, !=, etc, and another variable.

Next is

print

and

cprint

print, prints out the argument given. (prints to the terminal not printing out a sheet of paper) and cprint prints out the second argument, with the first argument being the color. If you want to know every color supported, in your local windows terminal emulator type in

help color

and that will tell you all the colors.

next up is variables. You declare a variable using

var

and the argument is the variables name

Next we have

newln

newln will print a new line because print and cprint does not.

The next token is

setbg

setbg will set the background color to what the arguments is, also it uses the same colors as cprint so

help color

will tell you what colors you have, also it will tell you the order of text color and background color because setbg can also set the text color.

Next thing that is important for if you want to use cprint is that you have to include libraries! Currently the library(s) are hardcoded, but I fully implement including and creating libraries in the future. Anyway, enough about my rant.

include

will include the library specified. You need to include graphics and enable colors to be able to use cprint.

Next to enable stuff,

enable

enable will enable include certain functions from libraries because of positioning. For example, enable colors is also need alongside include graphics to use cprint. Also all enable calls must be at the bottom of the file, or out of the way from other functions, because what it compiles there is not meant to be ran without arguments, and you cannot put arguments unless the function is called, so an error will happen and most likely you will be softlocked and have to ctrl-c the program to exit.

Next we got

func

this will create a function. It will name the function what you passed as the argument.

Next,

()

yes, I know it's weird. I had no other ideas on what to name it, so it is two brackets. It will jump to the name of the function passed in as the first argument. It does not matter where the function is, it will jump to it no matter what.

Next,

breakpoint

this will pause at the breakpoint. Equivelent to batch's pause

And finally,

return(0)

and

return(1)

return(0) exits without an error.

and return(1) exits with and error.

I'm finally done writing this.

Yippe

By the way Tophatguard made this. I also made VLScript so duh I'm going to make a documentation.