I get this runtime error when i enter a random battle and when i beat the monster i get this really big runtime error
runtime error: Cannot modify null.occupied.
proc name: endbattle (/mob/proc/endbattle)
source file: Dragon Quest.dm,241
usr: Richter (/mob/Erdrick)
src: the babble (/mob/babble)
call stack:
the babble (/mob/babble): endbattle(Richter (/mob/Erdrick))
the babble (/mob/babble): npcdeathcheck(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): normaldamage(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): attack(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): maincombat(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): npcattack1(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): npcdeathcheck(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): normaldamage(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): attack(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): maincombat(Richter (/mob/Erdrick), the babble (/mob/babble))
the babble (/mob/babble): Click(the grass (86,96,4) (/turf/grass))
How could i fix this
Thanx
~Richter
ID:150178
Dec 2 2001, 4:45 pm
|
|
This error message is giving you a lot of useful information. First, you know that the error occurs on line 241 of Dragon Quest.dm. So you can go to that file in Dream Maker and type ctrl-G to go to line 241.
On line 241 you will find some kind of reference to someobject.occupied. The error "cannot modify null.occupied" means that the variable doesn't have an object set for it. Here's an example:
proc/NullError()
var/mob/M = new() //Create a new mob.
M.name = "Bob"
world << M.name //Show M's name to the world.
del M
M.name = "Connie" //Error! M is null because we just deleted the mob.