ID:266728
 
var/list/T=list()
for(var/mob/M as mob in world)
if(istype(M,/mob/pc))
if(M.client && M.key)
if(usr.trader==0)
if(M.trader==0)
T+=M
if(M.owner==usr.owner)
T-=M
else
if(M.alliance==usr.alliance)
T+=M
if(M.owner==usr.owner)
T-=M
else
if(M.alliance==usr.alliance)
T+=M
if(M.owner==usr.owner)
T-=M
if(!T.len)
usr<<"Sorry there is no one to trade with currently at this time."
return
var/mob/M as mob
var/r=input("Which person do you want to trade with?") in T
M=r








and the question is does this work???


afterwards I have it do inputs to M like so...

var/t=input(M,"What do you want?")

but it doesn't display the input...
Can you please surround the code with <DM> </DM> so we can actually read it?
In response to Nadrew
there you go :) I didn't know about that hahaha :)

didn't even know that was possible hey I learned something new today! :)
Out of curiosity, how do you manage to get such a huge gap in your code? Couldn't you align it to the left side of the screen a little?
In response to Foomer
That's what copy/pasting to the forum does, I've noticed alot of empty space when doing so.
In response to Foomer
I am not sure... I just used teh DM thing and when I cut and pasted it it made that big of a gap... well it's a snipet from a really long string of code, just a small fraction of it which is why it's sofar out... I believe anyways :)
var/list/T=list()
for(var/mob/M as mob in world)
if(istype(M,/mob/pc))
if(M.client && M.key)
if(usr.trader==0)
if(M.trader==0)
T+=M
if(M.owner==usr.owner)
T-=M
else
if(M.alliance==usr.alliance)
T+=M
if(M.owner==usr.owner)
T-=M
else
if(M.alliance==usr.alliance)
T+=M
if(M.owner==usr.owner)
T-=M
if(!T.len)
usr<<"Sorry there is no one to trade with currently at this time."
return
<b><i>var/mob/M as mob
var/r=input("Which person do you want to trade with?") in T
M=r
What exactly are you trying to achieve with the code, so I can know ideally what you want done?
In response to Foomer
what I'm trying to do is pick a thing from that list, which is supose to be a mob.

but for some reason when you pick from the list it doesn't recognize it as a mob!!

so I assigned M as the thing you picked from the list...

as hoping into turning it into a mob lol

so I can do inputs and such...

the thing is IT WORKS at parts like when I change avariable of M's it works, but inputs don't...
In response to Foomer
I just realized even though it wasn't inputing me if I accepted the alliance (remember how M=r)

I have var/s=input(M,"Do you accept?") in list ("Yes","no")

it was still saying S is equal to yes!!!!!

Quite strange if you ask me since it never gave me the input!!!
and it didn't give the other mob an input so this is really strange...