Getting an error when teaching characters skills through items

Hi there.

In my current project, I have items that teach you various abilities, however whenever I any of them on a character, the game crashes and I get an error that says:

Script 'Game_Battler' line 707:NoMethodError occurred.

undefined method 'tp' for nil:NilClass
Now, this is kind of weird as the items don't affect TP at all. I've made a list of scripts that I have that might possibly influence this error:

  • Victor Engine | Basic Module
  • Victor Engine | Action Restriction (However, I don't have any of the tags on the items, nor should this affect it)
  • Yanfly | Ace Status Menu
  • Yanfly | Ace Skill Menu
  • Yanfly | Ace Menu Engine
  • Tsukihime | Effect Manager
  • Mr. Bubble | RFF/E
  • Mr. Bubble | Info Pages Window
  • XaiL | Core
  • CSCA | Core
  • CSCA | Menu Organizer
If this list doesn't help, I'll provide you with the entire... Huge... List of scripts.

Thanks in advance!

-Dave
When you get the error, close the dialogue it pops up, and go to the Script Editor.

The Script and the Line of Code in that script should be selected for you.

What does it say?
When you get the error, close the dialogue it pops up, and go to the Script Editor.

The Script and the Line of Code in that script should be selected for you.

What does it say?
  #--------------------------------------------------------------------------

  # * Effect of Skill/Item on Using Side

  #--------------------------------------------------------------------------

  def item_user_effect(user, item)

  --->  user.tp += item.tp_gain * user.tcr

  end

 

Line 707 in Game_Battler. Marked with an arrow.
Try removing temporarily the scripts you mentioned, put them under main, if it works add the scripts back one at a time to see which one affect this. Also, what are your item settings? (scope, damage formula, effects...)
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Yep - disable all of your added scripts, then re-enable them one by one, testing each time, until the error happens. The last one you enabled will be the one that's got the problem.


If that doesn't help you, show us a screenshot of the Item tab for that particular item. Have you added any note tags to it, and what scripts use those note tags (give us LINKS to the scripts, not just their names)
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
Wait what? I didn't put this there? Welp.

Anyway, thanks for the suggestions. I'll check once I have time.
Alright, everyone, I jinxed it. It WAS Action Restriction by Victor Sant.

Thanks for your help!

Edit: Sorry about the double post!

Edit #2: In case Shaz sees this, I'd like to point out that I completely forgot that I already posted, as I was a bit stressed for an exam that was coming up shortly after I posted it. So, yeah. My bad.

In regards to VX Ace Support, my bad there, too. I must have been kind of tired.
You can EDIT your post to avoid double posting.


You posted your question in VX Ace Support. Since you are specifically looking for help with scripts, it belongs in RGSSx Script Support.

Original thread: https://forums.rpgmakerweb.com/threads/getting-an-error-when-teaching-characters-skills-through-items.39185/