Protocol snippet by KaVir into smaugfuss

Posted by Slakker on Tue 04 Feb 2014 05:00 AM — 3 posts, 17,027 views.

#0
Hey guys,

After some years of playing the big graphical MMO's I decided to tinker again with Mudding. I really like the idea of a graphical interface so I'm trying to get the protocol snippet working.

I was able to easily install the snippet into smaug 1.4a without issue, but I can't seem to get it to work with smaugfuss1.9 which I'm currently running.

I tried compiling in both Cygwin and my Third Generation Shell account and get the same errors..

protocol.h:103: error: expected indentifier before 'false'
protocol.h:103: error: expected ')' before 'false'
protocol.h:103: error: expected unqualified-id before 'false'
protocol.h:103: error: expected declaration before '}' token

here's the code in protocol.h

typedef enum
{
false,
true
} bool_t;

I'm really rusty at coding :P

Btw the current posted version of smaugfuss1.9 on the fuss website seems to have issues with loading the area files. It compiles nicely but you get a ton of log spam reading in the area files. So I'm using an older version of smaugfuss 1.9 that I found.

Any help would be appreciated, thx :)
Germany #1
Looks like you're compiling in C++, where true and false are actual keywords. You can strip out that typedef entirely, and just replace all instances of "bool_t" with "bool".
#2
Hey KaVir Thanks for repsonding :)

That solved it.

FYI, for anyone else trying to add this to 1.9 you just need to change out all the memory allocations + free to STRFREE etc as suggested in the snippet. For copyover/hotboot, I just had to add the additional descriptor variable and version tag etc like the changes to comm.c

Great Snippet.. now hours of plugin work :P