Reading the .MSG file

Idea and code exchange. Porting and new development talk here!

Moderator: Mod Squad

Post Reply
The Storm
Posts: 163
Joined: Fri Jun 09, 2006 2:35 am
Location: Dover, DE

Reading the .MSG file

Post by The Storm »

Ok, I've done the following:

dsknowmb=opnmsg("dsknow.msg"); in my init__ statement but I'm not able to do the following in another function:

prfmsg(DSKNOW);

It tells me that DSKNOW is an undefined symbol when it is in the .MSG file. Am I missing something more to this? The docs are crap when it comes to this at times.
The Storm
DarkStar Development
telnet://thecrazyhousebbs.com
http://www.thecrazyhousebbs.com

User avatar
Toyduck
Posts: 366
Joined: Thu Jul 06, 2006 11:34 pm
Location: Las Vegas NV
Contact:

Post by Toyduck »

Have you declared DSKNOW anywhere?

The Storm
Posts: 163
Joined: Fri Jun 09, 2006 2:35 am
Location: Dover, DE

Post by The Storm »

Toyduck wrote:Have you declared DSKNOW anywhere?
It's in the .MSG file. Now, I just need to know how to read that...so maybe I'm missing something in this process of loading the .MSG file, and trying to display one of the variables set there...how would I read a variable from it so that I can display it?
The Storm
DarkStar Development
telnet://thecrazyhousebbs.com
http://www.thecrazyhousebbs.com

Questman
Posts: 629
Joined: Sat Apr 01, 2006 9:48 pm
Location: Raleigh, NC
Contact:

Post by Questman »

You have to include the .H file generated by MSGIDX or WGSMSX

The Storm
Posts: 163
Joined: Fri Jun 09, 2006 2:35 am
Location: Dover, DE

Post by The Storm »

Questman wrote:You have to include the .H file generated by MSGIDX or WGSMSX
HOLY CRAP! Thank you...I can't say thank you enough. I was banging my head on the wall all this time.
The Storm
DarkStar Development
telnet://thecrazyhousebbs.com
http://www.thecrazyhousebbs.com

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Reading the .MSG file

Post by dspain »

The Storm wrote:Ok, I've done the following:

dsknowmb=opnmsg("dsknow.msg"); in my init__ statement but I'm not able to do the following in another function:

prfmsg(DSKNOW);

It tells me that DSKNOW is an undefined symbol when it is in the .MSG file. Am I missing something more to this? The docs are crap when it comes to this at times.
you doing an #include "dsknow.h" in the header of the program?

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Reading the .MSG file

Post by dspain »

The Storm wrote:Ok, I've done the following:

dsknowmb=opnmsg("dsknow.msg"); in my init__ statement but I'm not able to do the following in another function:

prfmsg(DSKNOW);

It tells me that DSKNOW is an undefined symbol when it is in the .MSG file. Am I missing something more to this? The docs are crap when it comes to this at times.
oh yeah and its: opnmsg("dsknow.mcv");

should have just been opnmcv :)

The Storm
Posts: 163
Joined: Fri Jun 09, 2006 2:35 am
Location: Dover, DE

Re: Reading the .MSG file

Post by The Storm »

dspain wrote:
The Storm wrote:Ok, I've done the following:

dsknowmb=opnmsg("dsknow.msg"); in my init__ statement but I'm not able to do the following in another function:

prfmsg(DSKNOW);

It tells me that DSKNOW is an undefined symbol when it is in the .MSG file. Am I missing something more to this? The docs are crap when it comes to this at times.
oh yeah and its: opnmsg("dsknow.mcv");

should have just been opnmcv :)
Hey Dan,

Ok, I want to open the MSG file, read the contents and echo it out to the user. Got a snippit for that? I'm still a bit lost as my app kills the server on the advertisement as it doesn't know what user. hehe
The Storm
DarkStar Development
telnet://thecrazyhousebbs.com
http://www.thecrazyhousebbs.com

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Reading the .MSG file

Post by dspain »

The Storm wrote:
dspain wrote:
The Storm wrote:Ok, I've done the following:

dsknowmb=opnmsg("dsknow.msg"); in my init__ statement but I'm not able to do the following in another function:

prfmsg(DSKNOW);

It tells me that DSKNOW is an undefined symbol when it is in the .MSG file. Am I missing something more to this? The docs are crap when it comes to this at times.
oh yeah and its: opnmsg("dsknow.mcv");

should have just been opnmcv :)
Hey Dan,

Ok, I want to open the MSG file, read the contents and echo it out to the user. Got a snippit for that? I'm still a bit lost as my app kills the server on the advertisement as it doesn't know what user. hehe
sure:


In Your C File
----------------

#include "myfile.h" /* include the message file header */
HMCVFILE filemb; /* declare the MCV file block pointer */

within the INIT__ proto-type have:
filemb=opnmsg("myfile.mcv"); /* open the file */

in the logon routine have it go:

setmbk(filemb); /* set the MSG pointer */
prfmlt(MSGBLOCK); /* write the prfbuf */
outmlt(usrnum); /* inject to current user */
rstmbk(); /* restore last MCV block */


in the shutdown routine type:

clsmsg(filemb); /* close the file for system shutdown */


if ya need me to send ya a simple skeleton that displays HELLO WORLD to a user logging on let me know.

The Storm
Posts: 163
Joined: Fri Jun 09, 2006 2:35 am
Location: Dover, DE

Re: Reading the .MSG file

Post by The Storm »

dspain wrote:if ya need me to send ya a simple skeleton that displays HELLO WORLD to a user logging on let me know.
That's sorta what I'm trying for right now. I will never turn down skeletons as the ARCMUD one confused me a bit as the functions are a bit new to me. It's not your usua printf(); routines..hehe
The Storm
DarkStar Development
telnet://thecrazyhousebbs.com
http://www.thecrazyhousebbs.com

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Reading the .MSG file

Post by dspain »

The Storm wrote:
dspain wrote:if ya need me to send ya a simple skeleton that displays HELLO WORLD to a user logging on let me know.
That's sorta what I'm trying for right now. I will never turn down skeletons as the ARCMUD one confused me a bit as the functions are a bit new to me. It's not your usua printf(); routines..hehe
oh wow i forgot i made that one years ago....should see the WGME and TA6 code.

im putting a skeleton on my system now that will allow you to see how messages are injected to users logging on.

mod it to your delight.

The Storm
Posts: 163
Joined: Fri Jun 09, 2006 2:35 am
Location: Dover, DE

Re: Reading the .MSG file

Post by The Storm »

dspain wrote:
The Storm wrote:
dspain wrote:if ya need me to send ya a simple skeleton that displays HELLO WORLD to a user logging on let me know.
That's sorta what I'm trying for right now. I will never turn down skeletons as the ARCMUD one confused me a bit as the functions are a bit new to me. It's not your usua printf(); routines..hehe
oh wow i forgot i made that one years ago....should see the WGME and TA6 code.

im putting a skeleton on my system now that will allow you to see how messages are injected to users logging on.

mod it to your delight.
Dan, again, thank you for all your help. :D
The Storm
DarkStar Development
telnet://thecrazyhousebbs.com
http://www.thecrazyhousebbs.com

User avatar
dspain
Posts: 2102
Joined: Sun May 07, 2006 10:38 pm
Location: richmond,virginia
Contact:

Re: Reading the .MSG file

Post by dspain »

The Storm wrote:
dspain wrote:
The Storm wrote: That's sorta what I'm trying for right now. I will never turn down skeletons as the ARCMUD one confused me a bit as the functions are a bit new to me. It's not your usua printf(); routines..hehe
oh wow i forgot i made that one years ago....should see the WGME and TA6 code.

im putting a skeleton on my system now that will allow you to see how messages are injected to users logging on.

mod it to your delight.
Dan, again, thank you for all your help. :D
no problem. im your local ISV customer service reprasentitive :)

Post Reply