ID:1307916
 
(See the best response by NNAAAAHH.)
Code:
turf
Login
login1
icon='13722.jpg'
login2
icon='13724.jpg'
NewChar
layer = 6
Click()
if(fexists("players/[usr.key]"))
switch(alert("You already have a character, do you want to override your character?","New Character","Yes","No"))
if("Yes")
fdel("players/[usr.key]")
if("No")
return
var/N = input(usr,"What is your name?","Name") as text
usr.name = N
switch(alert("What is your gender?","Gender","Male","Female"))
if("Male")
usr.gender = "Male"
usr.icon = 'BLNBase.dmi'
if("Female")
usr.gender = "Female"
usr.icon = 'BLNFemBase.dmi'
switch(input(usr,"What is your Race?","Race") in list("Human","Hollow","Shinigami","Vaizard","Mod Soul","Quincy","Bount"))
if("Human")
usr.race = "Human"
usr.loc = locate(55,15,1)
if("Hollow")
usr.race = "Hollow"
usr.loc = locate(59,49,2)
if("Shinigami")
usr.race = "Shinigami"
if("Vaizard")
usr.race = "Vaizard"
usr.loc = locate(55,15,1)
if("Mod Soul")
usr.race = "Mod Soul"
usr.loc = locate(55,15,1)
if("Quincy")
usr.race = "Quincy"
usr.loc = locate(55,15,1)
if("Bount")
usr.race = "Bount"
usr.loc = locate(55,15,1)
//usr.loc = locate(66,11,4)
LoadChar
layer = 6
Click()
if(fexists("player/[usr.key]"))
var/savefile/load
load = new ("players/[usr.key]")
load["mob"] >> usr
load["x"]>>usr.x
load["y"]>>usr.y
load["z"]>>usr.z
DelChar
layer = 6
Click()
fdel("players/[usr.key]")


Problem description: When I run the game, the login screen doesnt appear and it is all black, what am I doing wrong

Best response
You have to set the turfs onto the map and place them onto the map in that area, in mob/Login() or displaying it as a HUD, I guess would work the same.
I do have the turfs on a map
Could you give me the code that would be needed? Or an Example?
You get the location of where you placed the screen and then send the mob to that location inside mob/Login
In response to Ersdfghj
Ersdfghj wrote:
Could you give me the code that would be needed?

What not to say when someone is trying to help you. Instead of saying "give me the code" instead say explain to me what i did wrong and how i could fix it.
Or say please with a smiley face :)

Or ask if they could show you a snippet
Now that I have a little more free time, once you map the turfs onto place on the map; you'll have to send players there once they connect.

Login is used to preform actions when a client connects to the mob type you define it under.
mob/Login()//A general Login() function for ALL mobs
mob/Connecting/Login()//A Login() function for mobs with the type or parent type of mob/Connecting
mob/Player/Login()//Another example of what is explained above


Then you can use src.loc = locate([co-ords, or object type]) to set the location to that of the 'login screen'.

mob/Login()//same premise as the above examples here
src.loc=locate([x],[y],[z])//Set the mob's location to x, y, z; which you'll have to define here, or it'll do nothing.
//OR
mob/Login()
src.loc=locate(/turf/[turftype]/)//Set the mob's location to the first found instance of the type you define, in this example a turf that you'd have to specify to which turf by replacing information in the brackets.
Could the location be anywhere on the login screen
You want it to be in the center. Make sure the image is the same size as viewing the map ingame so it fits perfectly.