你好,我可以帮助你解决这个问题。

错误信息表明在行 92 有一个错误:"Assignment operator expected",这意味着编译器期望一个赋值运算符(如 = 或 += 等)。

但是,你的代码中并没有发现任何错误的赋值运算符。可能的原因是,你的 GameMaker 版本或配置出了问题。

以下是修复该问题的建议:

  1. 检查你的 GameMaker 版本,确保你使用的是最新的版本。
  2. 检查你的代码是否有任何错误的赋值运算符。
  3. 尝试重新编译你的代码,看看是否有任何错误。
  4. 如果以上方法都没有解决问题,请尝试在 GameMaker 的帮助文档或论坛中寻找相关问题的解决方案。

以下是你提供的代码的修复版:

if (currentUser.acting) // animation still playing maybe
{
    if (currentUser.image_index >= currentUser.image_number - 1) // perform action if it exists
    {
        with (currentUser)
        {
            sprite_index = sprites.idle;
            image_index = 0;
            acting = false;
        }
        if (variable_struct_exists(currentAction, "effectSprite"))
        {
            if (currentAction.effectOnTarget == MODE.ALWAYS) || ((currentAction.effectOnTarget == MODE.VARIES) && (array_length(currentTargets) <= 1))
            {
                for (var i = 0; i < array_length(currentTargets); i++)
                {
                    instance_create_depth(currentTargets[i].x, currentTargets[i].y, currentTargets[i].depth - 1, oBattleEffect, {sprite_index: currentAction.effectSprite}); // line 92.
                }
            }
            else // play at 0,0
            {
                var _effectSprite = currentAction.effectSprite;
                if (variable_struct_exists(currentAction, "effectSpriteNoTarget")) _effectSprite = currentAction.effectSpriteNoTarget;
                instance_create_depth(x, y, depth - 100, oBattleEffect, {sprite_index: _effectSprite});
            }
        }
        currentAction.func(currentUser, currentTargets);
    }
}
else // wait for delay and end turn
{
    if (!instance_exists(oBattleEffect))
    {
        battleWaitTimeRemaining--;
        if (battleWaitTimeRemaining == 0)
        {
            battleState = BattleStateVictoryCheck;
        }
    }
}