29 May, 2009, Splork wrote in the 1st comment:
Votes: 0
Im trying to use the smaug mssp snippet and add it to our mud, however Ive run into a couple errors that I havent been able to figure out….

protocols.c: In function `mssp_reply':
protocols.c:2590: `va_list' undeclared (first use in this function)
protocols.c:2590: (Each undeclared identifier is reported only once
protocols.c:2590: for each function it appears in.)
protocols.c:2590: syntax error before "args"
protocols.c:2603: `args' undeclared (first use in this function)
protocols.c: In function `write_to_descriptor_printf':
protocols.c:2698: `va_list' undeclared (first use in this function)
protocols.c:2698: syntax error before "args"
protocols.c:2700: `args' undeclared (first use in this function)

void mssp_reply( DESCRIPTOR_DATA * d, const char *var, const char *fmt, … )
{
char buf[MAX_STRING_LENGTH];
line 2590 va_list args;

if( !d )
{
bug( "%s: NULL d", __FUNCTION__ );
return;
}
if( !var || var[0] == '\0' )
{
bug( "%s: NULL var", __FUNCTION__ );
return;
}

line 2603 va_start( args, fmt );
vsprintf( buf, fmt, args );
va_end( args );

write_to_descriptor_printf( d, "%s\t%s\r\n", var, buf );
}


void write_to_descriptor_printf( DESCRIPTOR_DATA * desc, const char *fmt, … )
{
char buf[MAX_STRING_LENGTH * 2];
line 2698 va_list args;

line 2700 va_start( args, fmt );
vsprintf( buf, fmt, args );
va_end( args );

write_to_descriptormssp( desc, buf, strlen( buf ) );
}


Any help would be greatly appreciated…

Splork
29 May, 2009, Guest wrote in the 2nd comment:
Votes: 0
Most likely the file you're adding that to needs #include <stdarg.h> at the top is all.
29 May, 2009, Splork wrote in the 3rd comment:
Votes: 0
That worked, thank you!

Im slowly working my way through the other stuff. We use diku gamma and safe to say there is a lot of stuff in this snippet that we have not yet added to our codebase such as all the freads…
30 May, 2009, Splork wrote in the 4th comment:
Votes: 0
I am pretty close to having the plain text version implemented.

Is there a final document listing the variables wanted for this or is it continually evolving still? The tintin page did not have half of the ones the snippet did…

Id like to say thanks to the smaug team for the mssp snippet, it helped immensely! If anyone runs a DIKU mud and needs help just send me an email and I can send the changed code out or if the people here are interested I could add it to the snippets page?

Splork
30 May, 2009, Kline wrote in the 5th comment:
Votes: 0
30 May, 2009, Scandum wrote in the 6th comment:
Votes: 0
The plan is to have a set of core variables, with each mud directory defining a list of extended variables they support, which I'll link from my mssp specification in the 'Extensions' sections of the link section.

Currently the only extension link is: http://www.mudbytes.net/index.php?a=arti... the MudBytes list is freely edited and as far as I know still under construction.

The mud directories in turn need to figure out how to keep their variable lists compatible. I'll probably update the variable list once there's a conclusive list of extended variables that has wide acceptance.
30 May, 2009, Scandum wrote in the 7th comment:
Votes: 0
As a side note, MTH was written to be compatible with Merc. Given Sloth already has a telnet handler it should be very easy to add MSSP telnet support by using MTH's MSSP output generator (process_do_mssp() in telopt.c) and using whatever system Sloth currently has to negotiate MSSP support, which is almost identical to MCCP.
31 May, 2009, Splork wrote in the 8th comment:
Votes: 0
I added the handling back when I got into the mxp, mccp, etc kick. I actually ended up adding both the plain text and telopt versions just in case something changes…

The smaug snippet allows for easy handling of MSSP variables ingame, so I ended up using that part of the code for that aspect of the protocol and I send the information through the telnet handler.

Its up and running if anyone wants to see if the information is correct at slothmud.org 6101

Thanks for all the help, especially to Scandum for the help with debugging.

Splork
0.0/8