ID:172643
 
I am trying to make a hub login I dont know if thats what its called but what I mean is.. The login where you click the pictures to set up your character. Now I found a good demo and got this to work fine for me. Problem is once I make a character I dont have a loading/saving system, and I tried to make one but when I use it I get this error..



runtime error: Cannot modify null.name.
proc name: Login (/mob/create_character/Login)
usr: Majinveku (/mob/create_character)
src: Majinveku (/mob/create_character)
call stack:
Majinveku (/mob/create_character): Login()


Also when you try to load a character it takes you to the front of the login screen? Any ideas?
I think the term you are looking for is 'hud'. (Heads Up Display)

Anyway, that error simply means you were trynig to read/write to a variable, of a 'null' object.

This is an example...
var/obj/MyObj = locate(/obj)in loc
// Let's pretend there is no /obj object in loc, so nothing is returned,
// and MyObj is null.
MyObj.name = "Dan"
// Now we just tried to change the name of ... nothing.
// So we get the error.
In response to Yota
okay I really dont understand this but thanks
In response to Majinveku
Let me try... =)

Let's say someone brought you into a room with a whole bunch of shovels lined up against one wall. They tell you that one of these shovels has a note on it saying "M", and that you should take the handle off that shovel and bring it to them. So you look at the shovels, but none of them has a note on it saying "M"... so you obviously can't take the handle off that shovel, because that shovel doesn't exist! That's sort of what Dream Seeker is complaining about, except in this case it's a mob rather than a shovel, and the "name" variable of the mob rather than the handle of the shovel.

Actually that's a pretty terrible metaphor, but it will do. =D

In practical terms, you're probably referring to something like "M.name", but "M" doesn't exist. You can't change anything about a thing that doesn't exist, so you get the error.

Post that Login() proc. And turn debug mode on in your preferences (Preferences -> Build Options) so that you get line numbers with runtime errors. (Runtime errors are the ones you get in Dream Seeker.)
In response to Crispy
thank you, both of you, and yes that helps me more