ID:273042
 
How can I make a var list the users coordinates or location on the map? I know how to do this like

world<<"[x],[y],[z]"


But i need to make a Variable that contains your coordinates to use them on a grid. Can you please help me?

Also don't say

mob/var
Location="[x],[y],[z]"

Because i get a error saying


Player\Creation.dm:256:error:= :expected a constant expression
mob
var/xyz
verb/myXYZ() //or New(), or a proc...
xyz="[src.x]/[src.y]/[src.z]"


Then just output the xyz to the grid.
In response to Vic Rattlehead (#1)
It only shows black in the grid where the coordinates are supposed to show.
In response to XxBloody NightmarexX (#2)
mob
var/xyz
verb/myXYZ() //or New(), or a proc...
xyz="[src.x]/[src.y]/[src.z]"
src<<output("[src.xyz]","controlshere")

Of course, it looks really bad when outputted (a ton of boxes open up near it), but that's your job to fix.
In response to Vic Rattlehead (#3)
mob
var/Location
proc/Myxyz() //or New(), or a proc...
Location="[src.x],[src.y]"

mob/proc
Update_Who()
set background = 1
var/Row = 1
var/People = list()
var/A = 0
src << output("<center><font size =1><font color = red>Name","Who:[1],[Row]")
src << output("<center><font size =1><font color = red>Location","Who:[2],[Row]")
A += Players//add the number of players online to the temporary var so that it doesnt affect the Players var during the proces
People += Online//add the online people to the temporary list so as to leave the Online list from being affected by the process
Row += 1//add 1 to Row so that what comes next uses row 2 and not row 1
sleep(0)
while(A)//this will loops the process while A is still greater than 0
for(var/mob/M in People)//finds a person in the People list
src << output("<center><font size =1>[M]","Who:[1],[Row]")//displays this person's key in the grid
src << output("<center><font size =1>[M.Myxyz(Location)]","Who:[2],[Row]")//displays this persons's status in the grid
People -= M//removes the person from the list so there not repeated
Row += 1//makes the Row var increase by 1 so the next process will use the row bellow the current row and wont mess up the system
A -= 1//removes 1 number from A. A's number co-ensides with the number of people in People so when A hits 0 it means there isnt anyone in the list and stops the process
sleep 1//gives a delay of 1/10 seconds to stop infinite loop problems.
if(A == 0)//this will occur once the while(A) stops it'le display the number of players bellow the last name.
src << output("<center><font size =1>Players :","Who:[1],[Row]")
src << output("<center><font size =1>[Players]","Who:[2],[Row]")
Row += 1
..()

mob/var
Status = "Online"//you can use this to represent whether a person is afk, busy etc you can duplicate it to reflect other things if you want to as well.

var//these vars dont need any reference (src,usr,client etc)
Online = list()//this will be the list of people who have logged in.
Players = 0//this is the number of players who are on.
In response to XxBloody NightmarexX (#4)
Did you even read what I said? (btw, I'd recommend looking at my Player Count library... what your doing seems extremely complicated without even needing to)

And two, just put a arg in Myxyz that represents the location var, so that your "Location" arg in the output line will work.
In response to Vic Rattlehead (#5)
Ok thanks.