ID:264611
 
Code:
mob
PC
verb
Give_Away()
set hidden=1
var/list/A=new()
var/list/P=new()
for(var/obj/equipment/I in usr)
if(I.suffix=="(Equipped)")
return
else
A+=I
for(var/mob/M in world)
if(M.client)
P+=M
if(length(A)>=1)
var/obj/B=input("What would you like to give away?","Give Away?") in A
var/mob/C=input("Give [B] to who?","Who?") in P
B.Move(C)
C<< "[usr] has given you \a [B]."
usr << "You give [C] \a [B]."


Problem description: The problem is really strange, the above code works fine in testing but when i send the files to my host the verb seem to not work. Would having the verb called from a Menu effect it in anyway?

Which part of it does not work?You might want to try the len var instead of length.
In response to Gr1m d4 r34p3r
The code actually work when i host a server and test it. The problem is it doesn't work when my Host host the game. I just find this very odd, i have never had a problem like this with any other thing i have built in the same fashion.
The return statement will quit the entire procedure, not just the current iteration of the loop. You want continue instead.

The reason why it worked for you was because you were using an insufficient test case (no equipped items).

Also, your equipment system really needs to be fixed.
In response to Garthor
What exactly do you mean by "Fixed" Garthor, please enlighten me.
In response to Gr1m d4 r34p3r
Gr1m d4 r34p3r wrote:
Which part of it does not work?You might want to try the len var instead of length.

From what I've heard "len" is outdated and can break at times. It is better to use length().
In response to Hulio-G
Hulio-G wrote:
Gr1m d4 r34p3r wrote:
Which part of it does not work?You might want to try the len var instead of length.

From what I've heard "len" is outdated and can break at times. It is better to use length().

No, it isn't and no, it can't.
In response to Garthor
Garthor wrote:
Hulio-G wrote:
Gr1m d4 r34p3r wrote:
Which part of it does not work?You might want to try the len var instead of length.

From what I've heard "len" is outdated and can break at times. It is better to use length().

No, it isn't and no, it can't.

That's what Koil was telling everyone.
In response to Hulio-G
Your first reaction to something like that should be to open up the damn Reference and take two seconds to read the len entry, which is very short and says nothing about it being deprecated.