ID:142739
 
Code:
mob
var/player1 = ""
var/player2 = ""
var/player3 = ""
var/player4 = ""
var/player5 = ""
var/guest
Login()
usr.loc=locate(1,1,2)
if(player1 == "")
player1 = "[usr]"
usr << "your player one!"
return
if(player2 == "")
player2 = "[usr]"
usr << "your player two!"
return
if(player3 == "")
player3 = "[usr]"
usr << "your player three!"
return
if(player4 == "")
player4 = "[usr]"
usr << "your player four!"
return
if(player5 == "")
player5 = "[usr]"
usr << "your player five!"
return
else
usr = guest
usr << "your a watcher!"
return
Stat()
statpanel("Stats")
stat("Wave: ","[wave]")
stat("Time: ","[sec]")
stat("Door Life: ","[door]")
stat("Gold: ","[player1.gold]")
stat("")
stat("Gold: ","[player2.gold]")
stat("")
stat("Gold: ","[player3.gold]")
stat("")
stat("Gold: ","[player4.gold]")
stat("")


Problem description:
well I don't know how to do this bit I want it so when someone logs in there assigned a player (player1, player2 etc.) or a watcher.... I also want a statpanel displaying that defined persons gold but I don't know how to do that, as I messed up shown above.

Basically I want it so when someone logs on they are turned into a variable... well kinda. After that I will be able to display the usr as a var... if you get what I meen.
Learn how to use /list, seriously, it'll save you a lot of time.
var/list/players[0]   // Initiated list
client/New()
if(players.len < 5)
players += src
src << "You are the [players.len]\th player!"
Small snippet of how I condensed most of what you mentioned down to a measly few lines
In response to GhostAnime
mind giving me a lecture on lists?
In response to Nategrant
I can help point you to references which will teach you how to use them, it's kinda a big thing y'know...

DM Guide List Chapter
Associated List Values
Reducing abuse of lists
In response to GhostAnime
through this how would i call the players gold? [player[1].len.gold]?... i have no idea.
In response to Nategrant
var/client/C = players[1]
C.mob.gold
In response to Garthor
I don't know how I would bit this into a stat? since i know nothing about lists.
In response to Nategrant