Essentials Docs Wiki

This guide lists a number of common errors that you may encounter.

See also the guide Troubleshooting problems for instructions on how to read error messages and how to locate the source of problems.

See also the guide Asking for help for how to properly ask other people to help you with a problem you are having.

Note that the below information has not been updated for some time, and is likely to be out of date.

Syntax error

A very common error is one which occurs when writing a script event command in an event which is longer than one line, such as the one below:

Exception: RuntimeError
Message: Script Error within event 9, map 38 (Lab):
Exception: SyntaxError
Message: (eval):2:in 'pbExecuteScript' compile error
(eval):2: syntax error
***Line '(:SPEAROW,20,3)' shouldn't begin with '('.  Try
putting '(' at the end of the previous line instead,
or using Extendtext.

***Full script:

In this case, the error message tells you how to fix the error — you need to retype the script command such that it is laid out properly. The correct version of the line given in this example is:


Additionally, it's also possible to execute script commands with a single line for each parameter as seen below.


Note that the “(” is at the end of the first line now of the two examples above.

Alternatively, you can always use “extendtext.exe” to widen the script command box in events, allowing you to type everything on a single line.

File Data/XXX.dat not found

This error typically occurs when the player closes the game while compiling, interrupting the process without regenerating all .dat files.

The solution is to force a recompile (run playtest while holding Ctrl key).

File Data/MapXXX.rxdata not found

This error occurs either when the player is walking around a map (specifically when they approach the edge of one) or when they transfer to another map. The “XXX” in the error message will be a number.

Exception: Error::ENOENT
Message: File Data/MapXXX.rxdata not found.

It is caused when the user has deleted a map from the game, but has not removed all references to it, most likely in the PBS file “map_connections.txt”. The game crashes because it cannot find the specified map to connect to the current one.

Notably, this error also occurs when using events (typically those dealing with map transitions) that try to transfer the player to a map that no longer exists.

The solution is to clean up the connections, and for good measure, find and remove all other references to the deleted map.

Trainer not valid

This error occurs when a trainer battle is initiated.

Exception: RuntimeError
Message: Script error within event X, map X (Map X):
Exception: NameError
Message: (eval):1:in `pbExecuteScript'The trainer 'PkMnTRAINER_X' is not valid. Please add the trainer
to the list of trainer types in the Editor. See the wiki for
more information.

***Full script:

The error occurs because the trainer type given ("PkMnTRAINER_X" here) doesn't exist.

Ensure that this trainer type exists, and is spelled identically (it is case-sensitive) in the event starting the trainer battle to how it is defined in the PBS files "trainer_types.txt" and "trainers.txt".

Undefined method

When working with scripts, an error similar to this one will be encountered from time to time. In the example below, it is caused by misspelling a method name (in this case, pbSampleScript):

Exception: RuntimeError
Message: Script error within event X, map Y (Map Name):
Exception: NoMethodError
Message: Section147:24:in `pbSampleMethod'undefined method `pbMessages' for Kernel:Module
***Full script:

The error message gives the event ID, the map ID, and the map name (respectively) of where the error occurred, so you know where to look to fix the problem.

The error message also gives the script section and line number that caused the error. Given this information, it should be fairly easy to find the cause of the error and correct it (which is often a misspelling).

Bad line syntax (expected syntax like XXX=YYY)

This error occurs when something in a PBS file is not written correctly.

Exception: RuntimeError
Message: Bad line syntax (expected syntax like XXX=YYY)
File PBS/pokemon.txt, section 487, key WildItemRare

The error message provides the name of the PBS file and a section number. Ignore the key. You will need to look in the next section of the PBS file after the stated section, and analyse what is written in there to see what is wrong. As the error message says, it expects every line to be in the form "XXX=YYY", so you will probably be missing an equals sign in a line.

This doesn't apply to all PBS files, because they don't all work the same way.

Undefined method `*' for nil:NilClass

This error may be caused for invalid Tile Data:

Exception: NoMethodError
Message: undefined method `*' for nil:NilClass
075:CustomTilemap:510:in `addTile'

There's 2 reasons for invalid tile data. either you a) shortened a tileset but still had tiles on it that you were using in that map, or b) lengthened a tileset, but didn't open it up in the tileset tab of the database to set up priorities and terrain tags and the like.

Use the Invalid Tile Eraser from the debug menu to correct this.

Comparison of String with 0 failed

This occurs whenever a certain map loads (be that via connections, or if you try to warp to it). This may occurs even if you don't change anything in the map.

Exception: ArgumentError
Message: comparison of String with 0 failed
Game_Event_:161:in `<'
Game_Event_:161:in `nf_particles_game_map_refresh'
Game_Event_:148:in `each'
Game_Event_:148:in `nf_particles_game_map_refresh'
Particle_Engine:596:in `refresh'
Game_Event_:20:in `nf_particles_game_map_initialize'
Particle_Engine:591:in `initialize'
Game_Map_:57:in `new'
Game_Map_:57:in `setup'
Game_Map_:56:in `each'

This error occurs when you have an event with a condition with a variable value (Number) and this variable was a word (String). Example: You have an event that only start when the variable 40 has 1 or more, but the variable 40 has the rival name.

Note that some strings may have only numbers. To correctly check, just go in debug and enter the variables (the part that you can edit the variables values). If the variable has a number value (like 25), but when you click the value goes to 0, so it's a string. But if the string is "0", you unable to find with this method.

Other errors

  • A pop-up message may warn the user of a syntax error, and indicate the script section and line it is on. If the line it refers to is the very last line of that script section, it is likely that an end is missing somewhere earlier in the script section.
  • With Windows Vista users, this error may occur: Failed to obtain a trial serial number from the nTiles server. To remedy this, go to the folder "C:\Program Files\Enterbrain\RPGXP", right click the RPGXP.exe file (the orange icon with a dragon silhouette) and click "Properties". Select the “Compatibility” tab and check "Run this program in compatibility mode for:", and then select "Windows XP (Service Pack 2)”. Then under privilege level, check "Run as Administrator".
  • Essentials (the pack) uses the file "RGSS102E.dll" (in the game's main folder), but every time you save the project in an RPG Maker XP which uses a different version of this file (e.g. "RGSS104E.dll"), a configuration setting will be changed to point to that other version instead. This can result in the game crashing (generally in evolution scene) or not running. If this happens, you should edit the “game.ini” file found in the game's main folder, and change the appropriate line to "Library=RGSS102E.dll" OR edit the dll name to match the Library name.
  • For Windows 8, extendtext.exe only works if you run this executable using Windows XP SP2 compatibility mode.