ID:1124432
 
(See the best response by FIREking.)
Code:
//Remote Client
Communicate(procedure, arguments)
{
var/list/data = list()
data.Add(encryption)
data.Add(procedure)
data.Add(arguments)
world.Export("byond://[ip]:[port]?[list2params(data)]")
}

OOC(name, message)
{
Communicate("/world/proc/OOC", "[name], [message]")
}

//Game Server
world
Topic(T)
var/list/data = params2list(T)
if(data[1] != encryption)
{
return
}
else
{
call(text2path(data[2]))(data[3])
}


proc
OOC(name, message)
{
for(var/mob/M in world)
{
if(M.loggedIn)
{
mb_msgout("{R({x{YOOC{x{R){x [name]{R, '{x{Y[message]{x{R'{x", M)
}
}
}


Problem description:

Basically the 2nd argument isn't being transferred properly and is instead inside the first one for name is there any way to fix this?
it looks like you're not really debugging to see what's inside the data list. I'd be providing some raw output debugging in there to see exactly what you're getting.
i know whats in the data list it comes out fine its just the data[3] which is the argument comes out as one string im trying to make come out as 2 on the other side
Since you're using params2list, all it needs to have is a & in between each "thing" to become a list entry. Give me an input and output example...

input = Communicate("/world/proc/OOC", "MyName, MyMessage")

output = what is data[1], data[2], and data[3]??
yes that is true but im trying to make it use one entry in the list for all arguments.
data[1] is = the encryption code
data[2] is = /world/proc/OOC
data[3] is = "arguments for the call function so basically for ooc it would be like OOC(name, message) well i send "[name], [message]" and it just shows both of those in arg 1 due to it being a string and not being read as 2 seperate arguments that is the issue
its simple, you need your own way to split those arguments out into a args list. currently, you're not doing that.

world
Topic(T)
var/list/data = params2list(T)
if(data[1] != encryption)
{
return
}
else
{

var/list/argument_list = list()
//parse data[3] here, add results to the argument_list
call(text2path(data[2]))(arglist(argument_list))
}
how would i parse a entry from a list into a seperate list and then into arguments?? D:

            var/list/argument_list = list()
//how 2 parse data[3] into seperate entries in a list?
call(text2path(data[2]))(arglist(argument_list))
Best response
check out forum_account's text library and look for a function called split.

http://www.byond.com/developer/Forum_account/Text

you'd have something like

argument_list = split(data[3], ",")


you'll wanna make sure to get rid of the space you hardcoded in after the comma

Communicate("/world/proc/OOC", "[name],[message]")


otherwise, all messages will start with a space.
I got it to work thanks :)

call(text2path(data[2]))(arglist(dd_text2list(data[3], ",")))