-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started | Local literal variables
Literal variables store values that represent data that can be written down like text or numbers (exceptions apply)
Important
Naming convention for literal variables follows the same rules as player variables do, so:
✅ $literally1984
✅ $releaseTheEpsteinFiles
❌ $Stupid
❌ $69
❌ $site_02_report
$myVariable = "Hello, World!"
$myVar2 = 2137
$var3 = true
$value = RandomNum 1 10 int
Check the info about the RandomNum method!
It states: This method returns a number value, which can be saved or used directly.;
this is how we save this value!
$name = {@sender nickname}
We have not yet explored expressions, but it's pretty obvious that we get the nickname of @sender and save it to the $name variable.
This script will return the amount of players there are playing as SCPs.
# save the amount of SCPs by using the `AmountOf` method and `@scps` global variable
$amount = AmountOf @scps
# here we reply to the sender, by returning the variable value
Reply $amount
Important
Literal variables have one thing in common, they can be represented as text, so the Reply method can accept these as a valid reply message.
(These tutorials are ordered, start from the top)