ID:142204
 
Code:
turf/New
density = 1
Click()
switch(input("Would you like to be a pokemon?", "Character") in list ("Pokemon"))
if("Pokemon")
usr.client.view=6
new/obj/hudMeters/health_01(usr.client)
usr.updateHealth()
world<<"<font color=white>[usr] has joined!"
usr.pokemon = 1
usr.cansave=1
usr.loc=locate(292,4,1)
switch(input("Wich Type Of Pokemon You wish to be??", "Pokemon") in list ("Fire","Cancel"))
if("Fire")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Charmander!"
usr.Clan = "Fire"
usr.icon='charmander.dmi'
usr.icon_state="charm"


if(random == 2)
usr<<"<font color=white>You are now a Growlithe!"
usr.Clan = "Fire"
usr.icon='growlithe.dmi'
usr.icon_state="growl"

if("Cancel")
return


Problem description: When i try to login to my game this login code doesn't work for me. I could use some help with this. (Please don't get angry at me if i am not sure what you are talking about)

Rayquaza1903 wrote:
Code:
> turf/New
> density = 1
> Click()
> switch(input("Would you like to be a pokemon?", "Character") in list ("Pokemon"))
> if("Pokemon")
> usr.client.view=6
> new/obj/hudMeters/health_01(usr.client)
> usr.updateHealth()
> world<<"<font color=white>[usr] has joined!"
> usr.pokemon = 1
> usr.cansave=1
> usr.loc=locate(292,4,1)
> switch(input("Wich Type Of Pokemon You wish to be??", "Pokemon") in list ("Fire","Cancel"))
> if("Fire")
> var/random = rand(1,2)
> if(random == 1)
> usr<<"<font color=white>You are now a Charmander!"
> usr.Clan = "Fire"
> usr.icon='charmander.dmi'
> usr.icon_state="charm"
>
>
> if(random == 2)
> usr<<"<font color=white>You are now a Growlithe!"
> usr.Clan = "Fire"
> usr.icon='growlithe.dmi'
> usr.icon_state="growl"
>
> if("Cancel")
> return
>

Problem description: When i try to login to my game this login code doesn't work for me. I could use some help with this. (Please don't get angry at me if i am not sure what you are talking about)



Make sure that you have the turf/New placed or better yet assign an icon to it. There is an indention error there in, if("Cancel") it shouldn't be inside if("Fire") so correct that. Also I advice you to put usr.cansave, usr.pokemon, usr.loc etc., after the player chooses what kind of pokemon he wants.
In response to Samehada24
how do i assign an icon to turf/New?
K i fixed to if("Cancel") so it isn't inside if("Fire").
For the usr.cansave, usr.pokemon, usr.loc do i put that under the switch?
In response to Rayquaza1903
No don't put it under switch. Do it something like this:

turf/New
icon = null // or assign icon if you want
density = 1
Click()
switch(input("Would you like to be a pokemon?", "Character") in list ("Pokemon"))
if("Pokemon")
switch(input("Wich Type Of Pokemon You wish to be??", "Pokemon") in list ("Fire","Cancel"))
if("Fire")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Charmander!"
usr.Clan = "Fire"
usr.icon='charmander.dmi'
usr.icon_state="charm"
if(random == 2)
usr<<"<font color=white>You are now a Growlithe!"
usr.Clan = "Fire"
usr.icon='growlithe.dmi'
usr.icon_state="growl"
if("Cancel")
return
usr.client.view = 6
usr.pokemon = 1
usr.cansave = 1
new/obj/hudMeters/health_01(usr.client)
usr.updateHealth()
world<<"<font color=white>[usr] has joined!"
usr.loc = locate(292,4,1)
..()


Also make sure of the location where you assign the mob. Maybe it's out of bounds.
In response to Samehada24
what would the icon be?
In response to Rayquaza1903
Assigning icons to objects is one of the first things you should have learned. If you don't know how, take a look at this tutorial.
In response to Nickr5
I have read that at least 10 times!
In response to Rayquaza1903
I am going to help you, but if you can't understand how to assign icons to turfs you need to reread the guide 10 more times.

turf/New
icon = 'Turfs.dmi' //the file the icon is in
icon_state = "" //if the icon has a name
density = 1
Click()
switch(input("Would you like to be a pokemon?", "Character") in list ("Pokemon"))
if("Pokemon")
switch(input("Wich Type Of Pokemon You wish to be??", "Pokemon") in list ("Fire","Cancel"))
if("Fire")
var/random = rand(1,2)
if(random == 1)
usr<<"<font color=white>You are now a Charmander!"
usr.Clan = "Fire"
usr.icon='charmander.dmi'
usr.icon_state="charm"
if(random == 2)
usr<<"<font color=white>You are now a Growlithe!"
usr.Clan = "Fire"
usr.icon='growlithe.dmi'
usr.icon_state="growl"
if("Cancel")
return
usr.client.view = 6
usr.pokemon = 1
usr.cansave = 1
new/obj/hudMeters/health_01(usr.client)
usr.updateHealth()
world<<"<font color=white>[usr] has joined!"
usr.loc = locate(292,4,1)
..()
In response to DarkGamer
I don't know what the icon is supposed to be. I can't find it explaining what would go there in the tutorial.
In response to Rayquaza1903
1. Do you have icons?
2. Do you have a map?
In response to Jemai1
Of course i have a map and icons! My game is great except for the login code.
In response to Rayquaza1903
Good. Did you make an icon for turf/New and place it on the map?
In response to Jemai1
i figured everything out now. Thanks Jemai! Thanks Dark and Shamehada24.