Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Running the server ➜ Queston on funny Rom24b6 MXP text

Queston on funny Rom24b6 MXP text

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Drithentir   Canada  (15 posts)  Bio
Date Fri 09 Sep 2005 10:40 AM (UTC)
Message
Hi there, with the help of these forum posters, I was able to get a ROM 2.4b6 with MXP working, but now I've run into another snag:

What's this?

By what name do you wish to be known? Drithentir
Password:
<!ELEMENT Ex '<send>' FLAG=RoomExit><!ELEMENT rdesc '<p>' FLAG=RoomDesc><!ELEMENT Get "<send href='get &#39;&name;&#39;|examine &#39;&name;&#39;|drink &#39;&name;&#39;' hint='RH mouse click to use this object|Get &desc;|Examine &desc;|Drink from &desc;'>" ATT='name desc'><!ELEMENT Drop "<send href='drop &#39;&name;&#39;|examine &#39;&name;&#39;|look in &#39;&name;&#39;|wear &#39;&name;&#39;|eat &#39;&name;&#39;|drink &#39;&name;&#39;' hint='RH mouse click to use this object|Drop &desc;|Examine &desc;|Look inside &desc;|Wear &desc;|Eat &desc;|Drink &desc;'>" ATT='name desc'><!ELEMENT List "<send href='buy &#39;&name;&#39;' hint='Buy &desc;'>" ATT='name desc'><!ELEMENT Player "<send href='tell &#39;&name;&#39; ' hint='Send a message to &name;' prompt>" ATT='name'>


I assume that's some weird MXP gibberish? How do I fix it? Thanks.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Fri 09 Sep 2005 12:03 PM (UTC)
Message
That's what MXP is. Does your client support MXP?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #2 on Fri 09 Sep 2005 12:58 PM (UTC)
Message
zMUD 6.16, so I assume so.

Wow fast response :P


Second question, I'm a bit rusty on my C, so what does this mean again and how do I fix it? I prefer not to have warning ready to pounce on me and become errors later.


Comm.c line 421 Warning: implicit declaration of function 'close'
Comm.c line 1073 Warning: implicit declaration of function 'read'
Comm.c line 151 Warning: implicit declaration of function 'write'


Thank you very much.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #3 on Fri 09 Sep 2005 05:06 PM (UTC)
Message
Do you have MXP enabled on Zmud? It seems like it is not interpreting it.

Try to copy/paste the errors exactly from now on.

I would assume you forgot to include a file. Can you paste those lines?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #4 on Fri 09 Sep 2005 08:05 PM (UTC)
Message
That's the error exactly from zMUD. I gave up on using MXP because I figured some players might not be using zMUD and so I restarted with a base ROM24b6



OK the error is this:

comm.c: In function 'main':
comm.c:421: warning: implicit declaration of function 'close'
comm.c: In function 'read_from_descriptor':
comm.c:1073: warning: implicit declaration of function 'read'
comm.c: In function 'write_to_descriptor':
comm.c:1531: warning: implicit declaration of function 'write'

This is straight vanilla ROM 24b6. Sorry about the confusion last night, it was really late :P


CC = gcc
PROF = -O -g
NOCRYPT = -DNOCRYPT
C_FLAGS = -Wall $(PROF) $(NOCRYPT) -DOLD_RAND
L_FLAGS = $(PROF)
LIBS = -lcrypt

O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o \
handler.o healer.o interp.o note.o lookup.o magic.o magic2.o \
music.o recycle.o save.o scan.o skills.o special.o tables.o \
update.o

rom: $(O_FILES)
rm -f rom
$(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)

.c.o: merc.h
$(CC) -c $(C_FLAGS) $<

That's the MAKEFILE

Thank you for your time.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Fri 09 Sep 2005 08:11 PM (UTC)
Message
ZMud isn't the only client that supports MXP, I see no reason to remove it I suppose.

Can you show me those lines in comm.c?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Fri 09 Sep 2005 09:19 PM (UTC)
Message
MXP isn't really supposed to be enabled by default, rather the MUD is supposed to negotiate with the client. I'm a little surprised that the codebase is spitting it out without "asking", as it were.

For the functions you probably need to include unistd.h or something like that.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #7 on Fri 09 Sep 2005 11:51 PM (UTC)
Message
Yeah I found that funny in regards to the MXP, otherwise it would be a pretty poor piece of code. I got the MXP enabled ROM 24b6 off this site, anyone with more experience than me able to figure out the toggle to turn it on/off?

Thanks again.
Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #8 on Fri 09 Sep 2005 11:53 PM (UTC)
Message
#if defined(unix)
control = init_socket( port );
boot_db( );
sprintf( log_buf, "ROM is ready to rock on port %d.", port );
log_string( log_buf );
game_loop_unix( control );
close (control); <--Line 421
#endif




#if defined(MSDOS) || defined(unix)
for ( ; ; )
{
int nRead;

nRead = read( d->descriptor, d->inbuf + iStart, <--Line 1073
sizeof(d->inbuf) - 10 - iStart );
if ( nRead > 0 )
{
iStart += nRead;
if ( d->inbuf[iStart-1] == '\n' || d->inbuf[iStart-1] == '\r' )
break;
}
else if ( nRead == 0 )
{
log_string( "EOF encountered on read." );
return FALSE;
}
else if ( errno == EWOULDBLOCK )
break;
else
{
perror( "Read_from_descriptor" );
return FALSE;
}
}
#endif

d->inbuf[iStart] = '\0';
return TRUE;
}



bool write_to_descriptor( int desc, char *txt, int length )
{
int iStart;
int nWrite;
int nBlock;

#if defined(macintosh) || defined(MSDOS)
if ( desc == 0 )
desc = 1;
#endif

if ( length <= 0 )
length = strlen(txt);

for ( iStart = 0; iStart < length; iStart += nWrite )
{
nBlock = UMIN( length - iStart, 4096 );
if ( ( nWrite = write( desc, txt + iStart, nBlock ) ) < 0 ) <--Line 1531
{ perror( "Write_to_descriptor" ); return FALSE; }
}

return TRUE;
}

Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #9 on Sat 10 Sep 2005 12:08 AM (UTC)
Message
MXP must be turned on/off via the client. You'll have to look through the ZMud options.

Did you try the include Ksilyan suggested?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #10 on Sat 10 Sep 2005 12:17 AM (UTC)
Message
Nevermind about the comm.c, it was true, adding #include <unistd.h> helped.

Thanks a bunch :)

Now to figure out what's with MXP. I'm going to see if adding it manually from an MXP package has any difference


Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #11 on Sat 10 Sep 2005 12:21 AM (UTC)
Message
So what if telnet tried accessing the MUD with MXP? I mean right now I got weird gibberish from a zMUD with MXP. This is new grounds for me because the last MUD I was on was more "traditional".
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #12 on Sat 10 Sep 2005 12:30 AM (UTC)
Message
Right, telnet does not support MXP. But there should be a ingame option to toggle MXP off or on. (Most MUDs ask when you create your character)

It means that Zmud doesn't have the MXP option on. You'll have to turn it on.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #13 on Sat 10 Sep 2005 12:57 AM (UTC)
Message
Well, there's either the in-game option, or the negotiation option. My MUD negotiates with the client, so if the client supports it the MUD enables MXP automatically. I modified the code that Nick provides on this website to enable MXP for SMAUG.

But yes, simply turning it on by default isn't very "polite"... what Zeno suggested, asking for MXP support at character creation, is a good idea. The only problem with that is that you can't get MXP until the character has logged in. On my MUD I can use MXP for auto-login, which is sort of nifty.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Drithentir   Canada  (15 posts)  Bio
Date Reply #14 on Sat 10 Sep 2005 12:59 AM (UTC)
Message
Hrm, guess I'll do without MXP for now until I know someone on the dev team will actually use the thing. :P
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


30,500 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.