If Not fileExist(foneline) Then
If Not fileExist(foneline) Then
This is the first line of your code that gets executed, but you have no value assigned to the fonline variable when you are calling it. That is at least one problem.
So, i'm trying to write an MPL. The following script compiles, but
doesn't run. It displays "Ia! Cthulhu!" about a dozen times, then locks up. If anyone out there can tell me what's wrong with this script,
please let me know. Thanks for any and all help.
#### begin ##################################################################
uses
cfg,
user;
var Twriters : array[1..10] of string;
var Toneliner: array[1..10] of string;
var S : string;
var foneline : string;
var Ch : char;
var Ch2 : char;
var Count : byte;
var Count2 : byte;
var f : file;
// begin show procedure ######################################
// Foneline := cfgDataPath + 'oneliner.lst'
Procedure show()
Begin
clrscr
dispFile('oneh.ans');
For Count := 1 To 10 do
Begin
write('├╛ ');
write(padRT(Toneliner[count], 64, ' '));
write(' : ');
writeln(padRT(Twriters[count], 10, ' '));
End
End
// end bot_bar procedure ######################################
// begin top_bar procedure ####################################
Procedure top_bar();
Begin
dispfile('oney.ans');
Ch2 := ReadKey;
If Ch2 = #13 then
Begin
dispFile('oneline.asc');
Write(': ');
S := stripmci(Input(70, 70, 11, ''));
If S = '' then
WriteLn('aborted');
Halt
End
For Count := 1 To 9 do
Begin
Count2 := Count + 1;
Toneliner[count] := Toneliner[count2];
Twriters[count] := Twriters[count2];
End
tWriters[10] := userAlias;
tOneliner[10] := S;
fassign(f, foneline, 66);
freset(f);
For Count := 1 To 10 do
Begin
fWriteLn(f, tOneliner[count]);
fWriteLn(f, tWriters[count]);
End
fClose(f);
show();
End
// end top_bar procedure ######################################
// begin position procedure ###################################
Procedure position();
begin
Repeat
DispFile('onen.ans');
Ch := ReadKey;
If IsArrow and Ch = #80 then
Begin
dispfile('onen.ans');
top_bar();
End
Else if IsArrow and Ch = #72 then
top_bar();
Until Ch = #13;
End
Procedure bot_bar();
begin
dispFile('onen.ans');
Ch2 := ReadKey
If Ch2 = #13 then
MenuCmd('go', 'main');
Halt;
End
// end position procedure ##########################################
// This starts the main program here.
Begin
If Not fileExist(foneline) Then
Begin
fassign(f, foneline, 66);
fReWrite(f);
For count := 1 To 10 do
begin
fWriteLn(f, 'Ia! Cthulhu!');
fWriteLn(f, 'ignatius');
End
fClose(f);
End
Foneline := cfgDataPath + 'oneliner.lst'
fassign(f, foneline, 66);
freset(f);
For Count := 1 To 10 do;
Begin
fReadLn(f, Toneliner[count]);
fReadLn(f, Twriters[count]);
End
fClose(f);
show();
// end show procedure #########################################
// begin bot_bar procedure ####################################
End
Done
## end ######################################################################
TIA,
|09ignatius |07(|15cia|07/|15scrollz|07)
--- Mystic BBS v1.10 A51 (Linux)
* Origin: catch22bbs.com (46:1/124)
You have defined Foneline AFTER you tried to use it above in the fassign function.
|01▄▄█▓▀▀▌▀▀▀▀ ░▀ ░|04|01▓▀ on |0908/31/14 |09Gryphon |01said..
You have defined Foneline AFTER you tried to use it above in the fass function.
Which fassign function? The first or second?
It has to be defined before you use it. You use it in the first fassign function, then you assign fonline, then you use it again in the second fassign function. It has to be assigned before the first use of it.
|01▄▄█▓▀▀▌▀▀▀▀ ░▀ ░|04|01▓▀ on |0909/01/14 |09Gryphon |01said..
It has to be defined before you use it. You use it in the first fass function, then you assign fonline, then you use it again in the secon fassign function. It has to be assigned before the first use of it.
Ok. I did that. It still isn't executing. :(
Ok, not sure if you realize this, but that line above, as quoted, is pretty annoying. It might translate well on your local host, but not on
I was able to get it to run as with that one modification. However, all it does is display the oneline.lst file, since I don't have the ansi's
to go along with it. Nor have you put any code in there for user interaction.
I'm assuming, by looking at the code, that you want to be able to use the lightbar to move up and down, and select one of the entries, yes?
All your code is doing right now, is after it reads the files and loads the variables, is that it calls the 'show()' function. And all that function does is display the oneh.ans file and then displays all the toneliner and twriter variables, then exits the program.
Maybe if you describe to me what you want it to do, I can help you out with it.
things? BTW, I originally wrote this program for Mystic 1.07.3. For the record, currently, I absolutely do not understand the "new" syntax.
Its pretty close to 100% Turbo Pascal syntax.
Ah. I'm so used to C syntax. Like IPL, for example.
Ok, not sure if you realize this, but that line above, as quoted, is pretty annoying. It might translate well on your local host, but not
Ok. I will remove it. Thanks for letting me know.
I was able to get it to run as with that one modification. However, it does is display the oneline.lst file, since I don't have the ansi' to go along with it. Nor have you put any code in there for user interaction.
What exactly did you do, and which line did you add the "foneline" variable to?
I'm assuming, by looking at the code, that you want to be able to use lightbar to move up and down, and select one of the entries, yes?
Yes. That's it exactly. 1) Display oneline.lst 2) allow the user to
choose between leaving a "oneliner" (thus adding it to oneline.lst) or going to the main menu. That's it right there.
All your code is doing right now, is after it reads the files and loa the variables, is that it calls the 'show()' function. And all that function does is display the oneh.ans file and then displays all the toneliner and twriter variables, then exits the program.
Hmm. Yeah. That doesn't seem right. I can't recall if my un-modified source has that issue or not. Reapern66 actually tried to re-write the program. I'm not trying to place blame, but maybe he missed a few
things? BTW, I originally wrote this program for Mystic 1.07.3. For the record, currently, I absolutely do not understand the "new" syntax.
Maybe if you describe to me what you want it to do, I can help you o with it.
Well, basically, like I said, it _should_ display oneline.lst and offer a choice between leaving a oneliner or going to the main menu.
Thank you for taking the time to help me out. It's much appreciated.
Ah. I'm so used to C syntax. Like IPL, for example.
If you are used to IPL then you can turn on IPL syntax. See rumors.mps
or the mpltest.mps that comes with Mystic.
Ok, so the choices are only leave a new oneliner, or to exit back to
the main menu? I see that you have it so that it calls the main menu
with menucmd('go','main'), which seems unnecessary. You could just exit out of the app instead, right?
Let me see what I can do with it, and I'll let you know.
Hmm. Yeah. That doesn't seem right. I can't recall if my un-modified source has that issue or not. Reapern66 actually tried to re-write the program. I'm not trying to place blame, but maybe he missed a few
things? BTW, I originally wrote this program for Mystic 1.07.3. For the
Hey man, I was wondering if you could help me out with something. I have an "auto message" MPL that needs to be re-worked. If you could take a
look at it, i'd really appreciate it.
Hey man, I was wondering if you could help me out with something.
I have an "auto message" MPL that needs to be re-worked. If you
could take a look at it, i'd really appreciate it.
The next alpha will have an automessage.mps BTW. I was waiting to
hear back from Access Denied's testing and then I was going to add it
into the defaults but I don't know where I left off with that stuff...
I just copied it in for A53.
Hey man, I was wondering if you could help me out with something. I have an "auto message" MPL that needs to be re-worked. If you could take a
look at it, i'd really appreciate it.
Hey man, I was wondering if you could help me out with something. I h an "auto message" MPL that needs to be re-worked. If you could take a look at it, i'd really appreciate it.
The next alpha will have an automessage.mps BTW. I was waiting to hear back from Access Denied's testing and then I was going to add it into
the defaults but I don't know where I left off with that stuff...
The next alpha will have an automessage.mps BTW. I was waiting
to hear back from Access Denied's testing and then I was going to
add it into the defaults but I don't know where I left off with
that stuff...
Dude!?!
That hurts :(
Dude!?!
That hurts :(
It was actually something I had requested for me personally. But hell, might as well include it as part of the default install if it works. :)
Dude!?!
That hurts :(
It was actually something I had requested for me personally. But hell might as well include it as part of the default install if it works.
Yeah this was done a long time ago, and was supposed to be added into the alphas. I can just not add it, Gryphon just made one.
Yeah this was done a long time ago, and was supposed to be added into
the alphas. I can just not add it, Gryphon just made one.
I'll take a look at it. What exactly is wrong with it?
That's completely up to the two of you. It suits the needs I requested back then, so I'm good with it. :)
I'll take a look at it. What exactly is wrong with it?
It doesn't execute. :/
I reworked it some. I noticed that there are no colord mci codes, where there obviously should be some. I'm thinking that they may have gotten stripped off since it was posted to the message area here.
I reworked it some. I noticed that there are no colord mci codes, whe there obviously should be some. I'm thinking that they may have gott stripped off since it was posted to the message area here.
It still doesn't work as it should. Thank you for trying. Here is the source code that I used before reapern66 took a look at the code.
I suspect that the code is not translating well over this medium. Maybe you can direct me to the original archive, and I can check it out?
I suspect that the code is not translating well over this medium. Ma you can direct me to the original archive, and I can check it out?
What do you mean "original archive"? Like pastebin or something?
zip file??
in other words, some format where it is in its most pure form and certain code sequences (eg: MCI codes) are not translated by systems handling the message ;)
I suspect that the code is not translating well over this medium. Ma you can direct me to the original archive, and I can check it out?
What do you mean "original archive"? Like pastebin or something?
Well, I'm assuming you got it from an uploaded file or something. The zipfile that it was packaged in. What is the filename? I'm assuming
it's an older mod that was distributed a long time ago. Would that be correct?
I suspect that the code is not translating well over this medium. Maybe~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
you can direct me to the original archive, and I can check it out?
Well, I'm assuming you got it from an uploaded file or something. Th zipfile that it was packaged in. What is the filename? I'm assuming it's an older mod that was distributed a long time ago. Would that b correct?
Good question. It's been so long, I can't remember. It's been re-written several times over. I think it may have originally been a re-written Iniquity IPL.
Tell me the best way to get it to you. I don't think posting it here is doing either of us any favors.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,055 |
Nodes: | 17 (1 / 16) |
Uptime: | 18:01:55 |
Calls: | 501,024 |
Calls today: | 11 |
Files: | 109,384 |
D/L today: |
2,218 files (187M bytes) |
Messages: | 304,880 |
Posted today: | 1 |