Hello, I am new to game making and Started making my game. I already have 5 Npc's(1 of them moving) and I know how to make events.
My main problem is I have a NameError saying exactly this:
Script ''line 131: NameError occurred
uninitialized constant Object::Game_Character
This happened when I was making a Inn/Bar
and I was creating the barkeeper. I then tried
to play test it to see if everything is working and
that is when the box showed up with the problem.
I am not very good with scripting(Especially with ruby)
So I do not know how to fix this problem.
Thank You.
Have you added any scripts to your project? And can you post a screenshot of the event in question, please?
class Game_BattleCharacter < Game_Character is the script the game is not accepting
and yes I have added a script, though I deleted it since it did not work
you either added another script, deleted the one you added incompletely, deleted something that was part of the original engine or changed one of the existing scripts.
An error like you described cannot happen without scripts or script commands, it is not part of the eventing sequences.
Did you insert or modify any scripts above the Game_Character - Script?
The scripts in the script editor are executed one by one, starting at the top script, so if you insert a script above the default ones, several constants might not yet be defined in the moment of execution.
If you are not sure you can search in all your scripts for a specific keyword by pressing CTRL+SHIFT+F.
You can always also create a new blank project, go into its Data folder, and copy the file called "Scripts" and paste it into your project's Data folder. That should set all the default scripts back to how they're supposed to be, which should potentially fix anything you might have accidentally deleted/edited/whatever.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
That error message indicates the issue is happening in an unnamed script slot. ALWAYS give your script slot names when you add a script ... so you know which one it's talking about when it gives you an error.