ID:145449
 
mob/Player
Login()
icon = 'Player.dmi'
New(mob/Player = "1,1,1")
Logout()


The object won't show its sprite when I log in. There seems to be no errors though. I've also tried it without the ".dmi" tag but it still didn't work.

Spacing is off, your not called the parent proc, and what's with the New(mob/player = "1,1,1") part? Makes no sense to me.

mob/Login() //mob/login works for anything 
..() //call the parent
icon = 'Player.dmi' //its not best to define the icon here, but whatever
var/mob/player/P = new /mob/player //set a var thats a mob/player, called P, and create a new /mob/player
P.loc = locate(1,1,1) //relocate the player to 1,1,1


I assume that's what you're trying to get at? If not, post something.
In response to Pyro_dragons
Ok thanks I'll try that.
New(Player "1,1,1")
In response to Madow
New(Player "1,1,1')? That's not going to do anything, it doesn't even make sense.
In response to Pyro_dragons
Hey, don't get pissed off at me just because I wrote something that doesn't make sense
In response to Madow
I'm not.

Again, defining the icon for the player at login is a bad idea. What if the players female? Or if they aren't a human char? It's better to define them a little like this.

mob/player
icon = 'player.dmi'
if(gender == male)
icon_state = "male"
if(gender == female)
icon_state = "female"


This way when a new player is created they have their icon male or female. This also is a bad way to do it, but better than just doing it at login.
In response to Pyro_dragons
Ok thanks
Is this right? I've modified due to errors.

mob/Login()
.()
icon = 'Player.dmi'
var/mob/Player = new /mob/Player
Player.loc = locate(1,1,1)
In response to Madow
Almost, the parent is called with ..() not .()
In response to Pyro_dragons
Oh yeah, I get this error about loop checks. I used the default loop check that they gave me when I loaded the game. I tried the loop check but it didn't work.

Edit: OMFG thanks!
In response to Pyro_dragons
Pyro_dragons wrote:
I'm not.

Again, defining the icon for the player at login is a bad idea. What if the players female? Or if they aren't a human char? It's better to define them a little like this.

mob/player
> icon = 'player.dmi'
> if(gender == male)
> icon_state = "male"
> if(gender == female)
> icon_state = "female"

This way when a new player is created they have their icon male or female. This also is a bad way to do it, but better than just doing it at login.

A few problems with that. You can't set the mobs icon like that. It has to be in a proc.
mob/player/Login()
..()
icon = 'player.dmi'
icon_state = usr.gender

//I would suggest though:
mob/player
icon = 'player.dmi'
//then in Login(), it sets the state as the user's gender.
In response to SJRDOZER
No its doesn't your completey wrong and you haven't show a proc in your coding all you have showed is a mob Read the DM guid some more before you try to correct someone
In response to A.T.H.K
A.T.H.K wrote:
No its doesn't your completey wrong and you haven't show a proc in your coding all you have showed is a mob Read the DM guid some more before you try to correct someone

Actually, he is completely right. You can't carry out a procedure from the definition of an atom. It just doesn't work that way. And, it wasn't his coding.

I think you should read the guide, and perhaps learn how to communicate in a forum properly. It could take a person literally hours to figure out what you said.

In response to CaptFalcon33035
Don't cry now

"A few problems with that. You can't set the mobs icon like that. It has to be in a proc."

Where is the proc? i don't see it in his coding do you?

And you can set icons like that
In response to A.T.H.K
"A few problems with that. You can't set the mobs icon like that. It has to be in a proc."

Where is the proc? i don't see it in his coding do you?

That's his point. It has to be in a proc. The person he was correcting did not have it in a proc.

And you can set icons like that

Not the way he was wanting to do it. SJRDOZER has the right idea here.
In response to A.T.H.K
A.T.H.K wrote:
Don't cry now

I won't.

"A few problems with that. You can't set the mobs icon like that. It has to be in a proc."

In addition to what Audeuro stated, I'm pretty sure he meant icon_state. icon just being short for definition of the icon, whose state is included as well.