ID:272525
 
/client/show_map = 0
var/server = null


/client/verb/send_message()
usr.Export()

mob/proc/Export(Addr,T as text)
Addr = server
if(!T)T = input(src,"What message do you want to send?")
Addr<<"<B><font color = blue>\[Announcement\]</B> [T]</font>"
world.Export("[Addr]?[T]")


How come this is sending to world.log and not TO the server?
How come you are outputting to 'Addr' a message, when Addr should be a text string (what is 'server'?)?
Yeah, it's a bit of a mess.
First off, it seems strange to have a verb under client... second, I don't see why you're even trying to using the Export() proc at all, since the client.Export() is for doing things with the client-save-files.
You have Addr as an argument in the proc and then don't seem to use it when you're calling the proc, and you are setting it with this "server" var that you have set as null anyway...
Since you then send the "announcement" to Addr, which is null (unless it's getting set elsewhere), I can only assume that's why it is getting outputted to world.log... as a sort of default output.
As for why you're trying to output directly into the Addr var, and THEN use world.Export(), I'm not sure. What are you trying to use this for?
In response to Ephemerality
OK, Basically I'm trying to send a message to another server.
In response to World Build
Where does the address to the server get set? Would the person have to enter it in along with the message, or does it get set on startup, or what?
In response to World Build
That's already done by your world.Export() call (only if 'server' and therefore 'Addr' is set correctly to the address, which is apparently not as it's null by default and I don't see it changed), though I suggest scrapping that and rewriting it to be less messy. Also, don't call your custom proc (if it's even needed) "Export" too, as that will just lead to confusion.
client/verb/sendmessage(server_ip as text,port as num,msg as text)
world.Export("[server_ip]:[port]?[msg]")


Well, look up world.Export() and world.Topic().
In response to Kaioken
<code> mob/verb/shout(Port as text,Msg as text) world << Msg world.Export("[Port]?shout:[Msg]") world/Topic(T) if(findtext(T,"shout:") == 1) world << copytext(T,7) </code>

This is straight from the DM guide and it still won't work!
In response to World Build
Works fine for me. If I had to take I guess, it is a PEBCAC issue: you are either not hosting the recipient world (so it can actually be contacted through a network port) or not specifying the correct port, etc.
In response to World Build
The 'World Topic' part needs to be on the server that's going to receive the message. And don't you need to define the server's ip address? [ipaddress]:[port]?
In response to Takoma
If there is no address, it will use the current computer's (127.0.0.1) which is suitable for testing purposes.
In response to Kaioken
Ah I see. I haven't spent much time looking at world Topic and Export :s