diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f1a03b7af7d6..3bff8aee89d4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7351,7 +7351,7 @@ static void Cmd_forcerandomswitch(void) } while (GetMonData(&party[i], MON_DATA_SPECIES) == SPECIES_NONE || GetMonData(&party[i], MON_DATA_IS_EGG) == TRUE || GetMonData(&party[i], MON_DATA_HP) == 0); //should be one while loop, but that doesn't match. - *(gBattleStruct->monToSwitchIntoId + gBattlerTarget) = i; + gBattleStruct->monToSwitchIntoId[gBattlerTarget] = i; if (!IsMultiBattle()) SwitchPartyOrder(gBattlerTarget);