Ok what I'm trying to do here is is get all mobs in world that meet the requirements to be put into a list... then beable to do an input and let them select from the list of the mobs.
for(T as mob in world)
if(T.owner!=src.owner)
if(istype(T,/mob/pc))
if(T.typechar==src.typechar)
if(T.client && T.key)
if(!T in L)
L+=T
var/M=input("who do you want to trade with?","Trade with?") as null|mob in L
but a list never comes up at all...
ID:266644
Apr 30 2002, 1:48 pm
|
|
Try something like this:
<code>var/list/L = list() for(var/mob/T in world) // your way is just weird if(T.owner!=src.owner \ && istype(T,/mob/pc) \ && T.typechar==src.typechar\ && T.client && T.key) if(!L.Find(T)) // perhaps you weren't checking this right? gather += T var/M = input("Who to trade with?","Trade with?") as null|mob in L</code> I can't really tell you what's wrong since I'm not totally sure, but in the mean time you can try that instead. |
try just in L