Main Menu
  • Welcome to The RPG Maker Resource Kit.

Random, unprovoked error appeared!

Started by Zodiac, December 08, 2012, 02:12:23 AM

0 Members and 1 Guest are viewing this topic.

Zodiac

Okay, so I was just making my game, doin some stuff when suddenly... ERROR.  I have no idea why. One minute everything works fine and dandy. The next, I'm getting an error after the battles aftermath. This is the error I'm getting:

Script 'Game_Actor' line 527:NoMethodError occurred.
undefined method 'points' for #<Game_Actor:0x36424a0>

And the line of code in question says this:

   $game_actors[@actor_id].points += ((@level/5).floor+2).floor*difference


The only thing that I've done since this started happening was replacing my outdated version of the YEM Victory Aftermath script with a new version. Find it here, if you need to look at it: http://pastebin.com/bqktktX9

Otherwise, I'm at a complete loss as to what could have caused this. I've removed the new script, and tried continuing like that, but no dice. It came with the same error. I don't think it's a compatibility issue, seeing as how I took out the script that I suspect caused it, and it has nothing to do with starting a new game as opposed to continuing a file, because the issue only happens after battles, including the test battles from the Troops tab in the F9 menu. I'm using VX. Thank you for your help.

pacdiggity

Line 527 of Game_Actor should read
    while @exp < @exp_list[@level]
The line in your post doesn't even exist anywhere in Game_Actor or the YEM script... I think you've botched your Game_Actor script or something somehow. I dunno.
it's like a metaphor or something i don't know

Zodiac

Alright, so I replaced the Game_Actors with a fresh one, and it still turned up the same error. However, I was testing random everythings, and I found out that it only errors when characters level up. That could be a nice bit of information to know

pacdiggity

Game_Actor and Game_Actors are different things. So, like, make sure you did the thing that was the right thing instead of the thing that was the wrong thing, because that would be the wrong thing to do.
it's like a metaphor or something i don't know

Zodiac

It was Actor, sorry. Didn't notice there was one of each, but I did copy over the correct one,

modern algebra

OK, well were you at one time using Lettuce's Stat Distribution System, and did you specifically edited Game_Actor to add those points pursuant to Lettuce's instructions?

My guess is that you removed that script at some point, and you forgot to delete that line. If that's true, just delete that line and it should be fixed. Alternately, you perhaps copied the Game_Actor script from a project that did use it? Either way, if you are not using Lettuce's Stat Distribution System, then you should delete that line.

From the information provided, that is my best guess.

Zodiac

Yeah, actually, I did use that script at one point, but I removed it since it was redundant with another one that I decided to use. I wasn't having any issue, though, until I updated my Victory Aftermath script. However, even after I removed the new script, and replaced the Game_Actor script with one from a fresh project, it still came up erroneous with the same line as the culprit. Which baffled me even more. I tried looking for the same version of the script I had before updating, hoping that would fix the error, but the link in the database was from the old pockethouse website, which is now broken. And every source online seems to have updated to the new version as well. I don't know the version number, but it was around 2009 that the update log was dated.   Funny thing, I decided to check again just to make sure I wasn't wasting time, and it turns out that when it came back with an error after I replaced the Game_Actor, for some reason the line found a way to weasel its way back in. I replaced it again, saved the project about ten times, and tried it again, and it worked. You guys save my ass more times than I can count. Thank you both.

modern algebra

The reason it might have started happening once you got the new victory aftermath script might be that the old one overwrote the gain_exp method of Game_Actor. Alternately, it might just be that you had not gained a level between the time you first removed the Stat Distribution Script.

Anyway, I am glad it is now working for you!