Undefined is not a Function VE_Scripts

Discussion in 'Javascript/Plugin Support' started by shadowscale1229, Jan 21, 2018.

  1. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Not a new game issue...that one's my fault...
    At the top of each of those functions, add a line that says
    Code:
    var a = data;
    You can add it right before or after the line that reads "var level = match[1];"

    Sorry about that.
     
    #21
  2. shadowscale1229

    shadowscale1229 Villager Member

    Messages:
    17
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, I'm doing all of this is a new project that I made, specifically for testing plug-ins to make sure they don't blow things up.
     
    #22
  3. shadowscale1229

    shadowscale1229 Villager Member

    Messages:
    17
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    EDIT: I can read I swear
     
    #23
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,310
    Likes Received:
    11,121
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    not a new project - a new game. Play, and choose New Game from the menu rather than continue from a save file.

    Sometimes plugins set things up right at the start of the game, and when you save the game, those settings are then in your save file. If you then change your notes or the plugin is changed, they still need to go through the "new game" process to set up all the stuff again, and if you reload your saved game, you're loading the old settings, which could cause it to not work.

    That's not the case here, as Llareian confirmed, but just be aware that it sometimes happens with plugins, so if you do get an error when you're playing a saved game, try starting a new game instead to see if it makes any difference. That's usually one of the first things we'll ask if you post that you're having an error.
     
    #24
  5. shadowscale1229

    shadowscale1229 Villager Member

    Messages:
    17
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, I am starting a new game.

    @Llareian Okay, so I added those lines, I set all the actors max MP levels and their MP level growth, but they still have 0 mp, as a curiosity, I still tried to use the item that raises Magic level 1 by one point, and now I'm getting "Cannot read property 'now' of undefined" and it's pointing to two lines that it hasn't before. Console attached.
    Edit: At this point, I'm fearing that it's just my incompetence as a programmer that's preventing it from working
     

    Attached Files:

    Last edited: Jan 23, 2018
    #25
  6. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm starting to think it would be easier for me to write a new plugin to do this than to keep trying to troubleshoot this one! I really don't understand why a lot of the flow is designed the way it is. I didn't realize I had kept a plugin command in my testing event that ran the "MaxMPLevel actor level value" command. Why that should fix it I don't know. I'll keep looking into it.
     
    #26
  7. shadowscale1229

    shadowscale1229 Villager Member

    Messages:
    17
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Well, thank you so much for your help. Though what did you mean by:
    Was it an event that was a parallel process?
     
    #27
  8. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    No it was the event that gave me the item so that I could test its use.
     
    #28
  9. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Okay...I've been giving this some thought, even though I haven't had time to look at the code again yet. There's basically four ways to proceed:

    1) I can keep banging my head against the wall trying to figure out what's wrong with the plugin you have. There's no guarantee I'll be able to figure it out, and it's been frustrating so far because the plugin isn't written very clearly (to me). I personally don't understand the choices the coder made, although they almost certainly had reasons for them.

    2) I can try to write you a plugin from scratch, which could be tailored more to your specific needs. I feel a little better about that now that I've had time to think about it...it will be a complicated plugin, and it has the potential to run into some compatibility issues, but I think I can see how to proceed with it. Lately I've been interested in using the power of the new plugin manager to use dropdown lists to select objects from the database (like skills) instead of using notetags. This makes it easier for you to select the right parameters, but it also means that if you make changes to your database, you have to remember to update your plugin parameters. This would also take a significant amount of time.

    3) You could try using variables instead of the plugin, though it would require one for each actor's spells per day at each level. You could display the spells per day in the status menu using Yanfly's Actor Variables.(requires Status Menu Core). You could hide the MP gauges using Yanfly's Skill Core. I'm not sure how you'd display them during battle; that would require some more thought.

    4) Check out Stitch Gaming's NeMV State Resources. I suspect this may actually work well for you out of the box.

    I would suggest you check out option 4 before coming back to either of the other three.
     
    #29
  10. shadowscale1229

    shadowscale1229 Villager Member

    Messages:
    17
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Apologizes, I was out of town this weekend with 0 computer access. I looked at the State Resources, and it left me... confused, to say the least. I could not for the life of me figure it out. I am not very javascript literate, and it used a bit more than I could figure out.

    I defiantly will not ask you to make a plug-in, or even work any harder than you have trying to figure out how to help me. I've mostly managed to get something similar working using Yanfly's limited skill uses. Thank you again for all of your help.
     
    #30
    Llareian likes this.

Share This Page