var/list/colors = list("Blue","Red","Green")
client
var/color = ""
New()
..()
while(!color)
var/list/ctemp = new()
ctemp += colors
color = input(mob,"What color would you like to be?","Color") in ctemp
if(color in colors) colors -= color
else
alert(src,"Sorry, that color was selected by another player, choose another.","Oops","Ok")
color = null
The problem is that multiple people can be seeing and selecting from the same list. If someone chooses Green, Green will still show for all the other players as an option. I received the error (stated in the topic) so I changed to the above setup. Before I simply used the "colors" list and checked to make sure the item was still in the list afterwards.
I don't want to deal with "checking out" the list so only one player can choose at a time. This setup still seems to function well but I still get the error (which doesn't actually seem to effect anything).
Any clue as to why that error is still cropping up, I have a feeling it is something simple I am glancing over...
ID:149003
Jul 29 2002, 3:37 pm (Edited on Jul 29 2002, 5:16 pm)
|
|
In response to Exadv1
|
|
The list was outside of any procs, verbs, and datums so it is automatically global :)
I restarted my computer and I stopped getting the error. Very odd, I just hope it stays gone... |
var/global/list...
Tell me if it works!