diff --git a/arm9/source/utils/scripting.c b/arm9/source/utils/scripting.c index 1a831ca..32755bb 100644 --- a/arm9/source/utils/scripting.c +++ b/arm9/source/utils/scripting.c @@ -442,6 +442,8 @@ bool init_vars(const char* path_script) { set_var("HAX", IS_SIGHAX ? (isntrboot() ? "ntrboot" : "sighax") : IS_A9LH ? "a9lh" : ""); // type of hax running from set_var("ONTYPE", IS_O3DS ? "O3DS" : "N3DS"); // type of the console set_var("RDTYPE", IS_DEVKIT ? "devkit" : "retail"); // devkit / retail + char* ptr = set_var("GM9VER", GM9VER); // GodMode9 version, truncated below + while (*(ptr++) != '\0') if (*ptr == '-') *ptr = '\0'; upd_var(NULL); // set all dynamic environment vars return true; diff --git a/resources/sample/HelloScript.gm9 b/resources/sample/HelloScript.gm9 index 9aa5c41..e16e6c8 100644 --- a/resources/sample/HelloScript.gm9 +++ b/resources/sample/HelloScript.gm9 @@ -29,6 +29,7 @@ ask "Continue running this script?" ask -o -s "Really continue running this script?\n(I will completely ignore your answer)" # ENVIRONMENTAL VARS +# GM9VER is the GodMode9 version number # REGION is the region of your device's SysNAND (USA, EUR, JPN, KOR, CHN, TWN or UNK for unknown) # SERIAL is the serial number of your device # GM9OUT is the standard output path @@ -41,7 +42,7 @@ ask -o -s "Really continue running this script?\n(I will completely ignore your # TIMESTAMP is the current time in hhmmss format # DATESTAMP is the current date in YYMMDD format # Use $[VAR] to get the *content* of a variable VAR -echo "Your region is $[REGION]\nYour serial number is $[SERIAL]\nYour std output path is $[GM9OUT]\nCurrent dir is $[CURRDIR]\nCurrent hax is $[HAX]\nYour system is a $[RDTYPE] $[ONTYPE]\nCurrent datestamp is: $[DATESTAMP]\nCurrent timestamp is: $[TIMESTAMP]\n \nYour sys / emu ID0 is:\n$[SYSID0]\n$[EMUID0]" +echo "Your GodMode9 version is $[GM9VER]\nYour region is $[REGION]\nYour serial number is $[SERIAL]\nYour std output path is $[GM9OUT]\nCurrent dir is $[CURRDIR]\nCurrent hax is $[HAX]\nYour system is a $[RDTYPE] $[ONTYPE]\nCurrent datestamp is: $[DATESTAMP]\nCurrent timestamp is: $[TIMESTAMP]\n \nYour sys / emu ID0 is:\n$[SYSID0]\n$[EMUID0]" qr "You can also have this as a QR code :)" "Your region is $[REGION]\nYour serial number is $[SERIAL]\nYour std output path is $[GM9OUT]\nCurrent dir is $[CURRDIR]\nCurrent hax is $[HAX]\nYour system is a $[RDTYPE] $[ONTYPE]\nCurrent datestamp is: $[DATESTAMP]\nCurrent timestamp is: $[TIMESTAMP]\n \nYour sys / emu ID0 is:\n$[SYSID0]\n$[EMUID0]" # ERRORMSG and SUCCESSMSG / 'set' COMMAND