Below you see a list of importable variable types in C# code using the args
dictonary.
var
can be used if you don't know what variable type it is.Not reccomended to be used.
var variable = args["variable"];
string
is for text not for numbers or other things.Used for e.g.
user
andrawInput
.
string text = args["text"].ToString();
int
is for whole numbers only.Used for e.g.
adLength
orviewers
(<-- this is generated with the raid event, with the number of viewers from the raid).
int number = Convert.ToInt32(args["number"].ToString());
bool
is fortrue
/
false
Used for e.g.
isModerator
,isVip
orisSubscribed
bool boolean = Convert.ToBoolean(args["boolean"]);
float
is for numbers with up to 7 decimals after the comma
float sevenDecimal = float.Parse(args["sevenDecimal"].ToString());
double
is for numbers with up to 14 decimals after the comma
double fourteenDecimal = Convert.ToDouble(args["fourteenDecimal"]);
decimal
is for numbers with up to 28 decimals after the comma
decimal twentyEightDecimal = Convert.ToDecimal(args["twentyEightDecimal"]);
var variable = args["variable"];
string text = args["text"].ToString();
int number = Convert.ToInt32(args["number"].ToString());
bool boolean = Convert.ToBoolean(args["boolean"]);
float sevenDecimal = float.Parse(args["sevenDecimal"].ToString());
double fourteenDecimal = Convert.ToDouble(args["fourteenDecimal"]);
decimal twentyEightDecimal = Convert.ToDecimal(args["twentyEightDecimal"]);