Page 1 of 1

Reading the .MSG file

Posted: Fri Jun 13, 2008 3:42 am
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.

Posted: Fri Jun 13, 2008 6:30 pm
by Toyduck
Have you declared DSKNOW anywhere?

Posted: Fri Jun 13, 2008 7:24 pm
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?

Posted: Fri Jun 13, 2008 10:47 pm
by Questman
You have to include the .H file generated by MSGIDX or WGSMSX

Posted: Sat Jun 14, 2008 1:10 am
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.

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 2:33 am
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?

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 2:36 am
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 :)

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 2:40 am
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

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 2:55 am
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.

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 3:03 am
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

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 3:20 am
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.

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 3:27 am
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

Re: Reading the .MSG file

Posted: Sat Jun 14, 2008 5:27 pm
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 :)