Wed Jan 02 13:16:36 2008
runtime error: Cannot execute null.Find().
proc name: New (/client/New)
source file: Admin.dm,1282
usr: null
src: Iraqii (/client)
call stack:
Iraqii (/client): New()
Iraqii (/client): New()
Iraqii (/client): New()
runtime error: Cannot read null.name
proc name: SaveMob (/client/proc/SaveMob)
source file: DBZ.dm,26
usr: null
src: Iraqii (/client)
call stack:
Iraqii (/client): SaveMob()
Iraqii (/client): Del()
Problem description:What you see above it the message i get when i try to run the .dmb. Theres a runtime error:cannot read null.name? what does this mean? whats the problem? how can i fix it?
ID:162482
Jan 2 2008, 2:44 am
|
|
Jan 2 2008, 3:39 am
|
|
there is nothing you can do but to tell the person who wrote the game to fix it.
|
In response to LawkJaw
|
|
There are no errors...i compiled the game and it has no errors or warnings. is it that it cant call New()? if so, why is it so?
|
In response to Iraqii
|
|
There are two types of "error alert" system in BYOND: compile-time and run-time alert
Compile-time error/warning messages shows up when you compile/build your project. This error/warning system tries checking the syntax and such of things programmed in (ex: if the appropriate number of arguments are defined, if the typecast object has the variable you want it to check, etc) This means that you can have compile-time alerts give no warning and alert because it seemingly looks OK to the compiler... however, it does not mean that everything will work perfectly. Runtime errors are given while the game is being played, this is the functional type of error system. What is currently happening is that under client/New(), on line 1282 in Admin.dm and in other spots, you are trying to refer to something when there is nothing. Solution: Have safety checks (ex: if(mob exists) Do this than ... you should learn boolean for this.) var/mob/M Runtime error: null.name <-- Because M is currently null var/mob/M = "X" Runtime message = "X".name "X" is a string, not a /mob type so it can not access that variable (obviously) var/mob/M = locate(/turf) Runtime message: nothing Result: Name of a /turf first locate()d -- This gives no error since /turf, like /mob, has the name variable -- var/mob/M = locate(/turf) Runtime message: undefined proc or verb (Move() is defined under /atom/movable, which /mob and /obj are under but not /turf and /area) var/mob/M = locate(/mob) Runtime message: Nothing Result: The first mob locate()d, M, Move()s to the same spot withou any error |
Thank you for making this same exact thread three times.
Please stop spamming the forums. |
Do not make the same post three times.
When you post in Code Problems, you need to actually post some code. In this case, the relevant code would be in the client/New() proc and in the client/SaveMob() proc. This thread has been moved to Developer How-To because you did not post code. Your other two threads have been deleted. Lummox JR |
In response to Lummox JR
|
|
Lummox JR wrote:
In this case, the relevant code would be in the client/New() proc and in the client/SaveMob() proc. For bonus points: he has, in fact, four separate client/New() procs, at least. |
In response to GhostAnime
|
|
So in this case what is it looking for that doesnt exist?
|
In response to GhostAnime
|
|
these are solutions for the messages u get(which are stated under them)? i used the first one nd i get 2 errors:
loading DBZ.dme login.dm:11:error:M.name:undefined var login.dm:11:error:world:bad variable definition what should i do here? |
In response to Iraqii
|
|
this is line 1282 of Admin:
client/New() whats wrong with it? |
In response to GhostAnime
|
|
i dont get what those codes u are posting supposed to do?? should i use on of them to fix the runtime error?
|
In response to Iraqii
|
|
Ever heard of examples? Read what's listed under those example snippets.
This is not a chatroom, this is a forum. Meaning that we are not on 24/7, so just have patience for a reply... if you can not wait nor be patient, you'll probably dislike programming than later on. |
In response to GhostAnime
|
|
examples of what are they? nd what are the things under them showing?
|
In response to Iraqii
|
|
Try reading instead of just copying and pasting code. It helps.
|
In response to Iraqii
|
|
Well, you can drop the ".log" part of that. It says that you have a bad variable in world, I am assuming that you have not created a logging script yet.
Try something like this: client/New() Of course, I am still new at this so I could be very wrong. |
In response to Zuglilth
|
|
That's not going to solve anything, and the issue is rather more deeply roted than that. If you aren't sure about something, don't try to help. You'll just tend to make things worse.
And for future reference: just because somebody is replying to a post, doesn't mean their post is a reply to that post. Some people just can't figure out how to operate these forums properly. |