Error Code Related to Script

● ARCHIVED · READ-ONLY
Started by SawyerFriend 9 posts View original ↗
  1. So, I've been working on a system that sort of combines FFVI's Runic Blade with FFV's blue magic, where when you have a certain state, you are targeted by spells, and there's a chance you'll learn the spell afterwards. I got this to work perfectly until I actually needed to check for the state. I admit, I'm ad-libbing it a bit, but this is the script I'm using to check if the spell gets learned.
    Code:
    <Post-Damage Eval>
    if (target.isActor() && (target.isStateAffected(30)) {
      if (!target.isLearnedSkill(item.id)) {
        if (Math.randomInt(100) < target.luk * 5) {
            target.learnSkill(item.id);
            var text = target.name() + ' has learned '
            text = text + item.name + '!';
            $gameMessage.add(text);
        }
      }
    }
    
    </Post-Damage Eval>
    Now, when I remove "&& (target.isStateAffected(30), I still get the same error, but when I revert it back to the original script which asked if the target's Class is ID 3, the script runs as intended again. What is it I'm doing wrong?

    The picture I added is of the error message.
  2. Someone else had this exact same error a couple of days ago.

    I don't recall if it was because they were using an out-of-date version of a plugin, or if their project had been made with a newer version of the core files than their editor.

    I suggest you check your plugins and see if there are any newer versions available.
  3. I think here is the problem: if (target.isActor() && (target.isStateAffected(30)) {
    Just delete it. We do encounter syntax errors, so better be careful and double-check everything.
  4. @JamesRyan @Shaz
    Aha! I found it! I checked all the plugins and they were all up to date, but deleting that parenthesis fixed the problem. Strange though, forgot to mention this in OP but when I tried deleting that parenthesis the first time, it didn't fix the issue. Must've been some other issue as well.

    Anyways, thanks a ton as always for helping me fix the issue!
  5. For future reference, that cryptic/non-helpful error message is due to Yanfly plugins using a deprecated function. Shaz' suggestion was on the money, to bypass the error you have to update those plugins.

    More information here.
  6. @Aloe Guvner Does this error do any harm to our projects, or just hard to debug? If it does nothing harm, i think i will not update YEP plugins. Somehow after i updated, my battlers' positions changed, so they all moved up a bit.
  7. To the best of my knowledge, this strange error message is just a nuisance rather than an actual issue.

    When an actual error occurs, this message merely obscures the real error message on the "crash screen". However, if you press F8 to open the console (as you should always do when a crash occurs), you will still be able to see the true reason for the crash.
  8. So i can skip these plugin updates now. Everything is stable and i don't wanna make change, or else i gotta test the game from scratch again to make sure the new plugins work well.
  9. I've moved this thread to Plugin Support. Thank you.


    If your problem is solved, please let us know so we can close the thread. Thanks.