diff options
author | Tustin2121 <tustin2121@gmail.com> | 2019-08-17 11:16:54 -0400 |
---|---|---|
committer | Tustin2121 <tustin2121@gmail.com> | 2019-08-17 13:26:31 -0400 |
commit | bac8974ce375bc464c6374cfeb4d74e4dc98a20a (patch) | |
tree | d16c70919b4b449384aaa308544cce7f6b38b86c /src/scrcmd.c | |
parent | f4d4424618b8b357af23978ef543fd033dece7e9 (diff) |
Added note about addvar
The contest scripts actually use addvar to add a -1 to a variable instead of using subvar to subtract a positive number. This is fine in vanilla, where addvar script command does NOT support adding the value of a variable to another variable (like subvar supports), but should anyone want to change it, contests will be inexplicably broken.
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r-- | src/scrcmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c index aa03181e6..e31be848a 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -466,6 +466,9 @@ bool8 ScrCmd_addvar(struct ScriptContext *ctx) { u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); *ptr += ScriptReadHalfword(ctx); + // Note: addvar doesn't support adding from a variable in vanilla. If you were to + // add a VarGet() to the above, make sure you change the `addvar VAR_0x8006, 65535` + // in the contest scripts to `subvar VAR_0x8006, 1`, else contests will break. return FALSE; } |