Refernce Error: Normal Not Defined (Please Help! :[)

Discussion in 'Javascript/Plugin Support' started by Moo :D, Jan 15, 2016.

  1. Moo :D

    Moo :D Veteran Veteran

    Messages:
    31
    Likes Received:
    3
    First Language:
    English
    Hi Community!   :D

    I am having an issue with a core plugin for our project called "TMJumpAction". I'm trying to setup evented encounters. The event has been set up with random movement and event touch ( I tried player touch also, same result ). When the event and player make contact (it makes no difference which one initiates it, i tried it both ways) the game crashes with the error: 

    "Reference Error"

    normal is not defined

    This error does not occur if the player touches the event from above. Only with player contact from below, left side and right side. This error only occurs when the event is given autonomous movement and touch triggers (player touch or event touch). I reproduced this error in its own project with TMJumpAction as the only plugin. I am uploading a demo of this error and posting a link to the plugin here as well. I have sent the author of the plugin a message as well, but I am not sure if he/she offers support for it anymore or will get to the message (perhaps language barrier or very busy)

    http://hikimoki.sakura.ne.jp/plugin/jump_action.html  <------- TMJumpAction Plugin by HikiMoki (Thx Hiki! ^^)

    https://www.dropbox.com/sh/6gp6rxumkn8fsyz/AABCfl0PSYcGa1nsgR5_Q173a?dl=0   <--------- (Link to Demo of Reproduced Error)

    Community, I really am thankful for how supportive we all are of each other. I am particularly thankful that each time I have personally sought help, someone has always been willing to help. For that thank you all! I really hope to make a positive mark on our community and I really hope our game makes a huge and positive impact on the RPG Maker Brand and community. Thank you all in advance for checking this listing out and anything you can say or do to help us I greatly appreciate! This plugin is crucial to our game, without it or another gravity plugin, I'm afraid I will likely have to reconstruct the vast majority of our game. Please help us if you can and thank you again for checking our plea! Have an awesome day!

    ~Moo 
     
    Last edited by a moderator: Jan 15, 2016
    #1
  2. Iavra

    Iavra Veteran Veteran

    Messages:
    1,797
    Likes Received:
    856
    First Language:
    German
    I don't speak japanese, so i don't understand anything from that side, and i didn't try the demo (at work currently), but this seems like the only place, where that error could happen:

    // 衝突したイベントの起動Game_Event.prototype.checkEventTriggerCollide = function(id) { if (!$gameMap.isEventRunning() && id < 0) { if (this.isTriggerIn([1, 2]) && this.isNormalPriority() === normal) { this.start(); } }};"isNormalPriority" returns a boolean, there is no need to compare it to anything (and "normal" is indeed not defined at that position), so you should be able to remove the " === normal" and have it running.Though, judging by this function

    // マップイベントの起動Game_Player.prototype.startMapEvent = function(triggers, normal) { if (!$gameMap.isEventRunning()) { var targets = this.collideTargets(); for (var i = 0; i < targets.length; i++) { var character = targets; if (this.isCollide(character)) { if (character.isTriggerIn(triggers) && character.isNormalPriority() === normal) { if (character.isBattler() && character.battler().isDead()) { continue; } character.start(); } } } }};you can see, that "normal" has a use, so there are 2 options:- The parameter are correct, but someone forgot to change the if.

    - The if is correct, but someone forgot to copy over the parameter.

    The second option would need some actual understanding of how the plugin works (which i have no time for, currently), so i'm going with option 1 for now.
     
    #2
    djbeardo likes this.
  3. Moo :D

    Moo :D Veteran Veteran

    Messages:
    31
    Likes Received:
    3
    First Language:
    English
    Iavra! Thank you so much for replying and replying while at work too! I just got back home myself and I immediately tried your solution by removing the ===normal line from the plugin. It no longer crashes on event/player touch! Thank you so much for your help! I'm not sure what functionality I just disabled, but in reality, all I need from this plugin is the gravity so it looks like this temporarily solves our problem! Thank you again so much for taking time and taking time to look at a plugin that is not only not yours, but written in a different language! I appreciate that alot!

    ~Moo
     
    #3

Share This Page