RPG Maker VX Ace Undefined [] method? Whats wrong with this script?

● ARCHIVED · READ-ONLY
Started by That Bread 8 posts View original ↗
  1. Looks like I hit another script error, and I do not have knowledge in coding so what do I do about

    this?

    Spoiler
    Here's where it is directing me

    Spoiler
    and here's the scripts page: http://victorscripts.wordpress.com/rpg-maker-vx-ace/battle-scripts/actors-battlers/

    No I did not edit this part of the script I only edited the battle positions, which can be seen below.

    Spoiler
    This error is happening when I enter battle, and thank you for your help. If you have a question please do ask, I will provide an answer as soon as I can.
  2. I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    The error is saying $game_custom_positions or $game_custom_positions[index + 1] does not exist. Are you playing a saved file that was created prior to adding the script?


    Or are you doing something that allows you to have more than 4 battlers in your party? If it's that, you need to set up custom positions for the extras.
  3. Sorry about that, must have gotten a mix up while going back and forth.

    This is a new save and should work. No I do not have set up for five.
  4. Well, those are the only two things I can think of that would cause that error on that line.

    Insert the following BEFORE line 318, play with the console turned on, and when the game crashes tell me what the console says:

    Code:
    p indexp $game_custom_positions
    If it gives you a different error message, also show the new error message.
  5. Interesting, I added what you suggested and now it works? Well it does, because a error message is not popping up.
  6. What I told you to add has nothing to do with it working or not working. Did you play the same way - from the same save file?


    Remove those extra lines and see if it works. They are for debugging purposes only and should not stay there.
  7. Okay I tested it out a few times with a new file and an old file. Looks like it was the old file that was causing the issue, which is interesting as this file was old by a few minutes ago with the script inside. I wonder if it is because I saved over an old save file? Could be, for now I will go ahead and erase all save files to prevent further confusion.
  8. The only way the old file would be the cause is if you had started the game prior to adding the script and saved it. Even if you loaded it after adding the script and saved again, the damage has already been done. Many scripts set up things with actors when you start a new game, and that is all saved in the save file. If you don't have a script and just let the actor setup happen normally, then you add a script that WOULD have set up some custom actor stuff, and go back to your earlier save file, the actors there still don't have those things set up (because they're saved with the save file and are not recreated every time you load the game).


    This is a very common issue with adding scripts and loading old save files because you don't want to start playing over again. If you add a new script, play a saved game that was made prior to adding the script, and you have problems, your first action should ALWAYS be to start a new game and see if the problem still happens. Many times, it won't.


    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.