On 06/17/16, Gryphon said the following...
Gr> You don't have your if statement grouped in the begin/end clause. I'm
Gr> guessing what's happening is you are getting that after the input, it's
Gr> doing a pause, then exiting, right?
tried this same thing
procedure atm;
var
a, b, c, d : longint;
input : string;
begin
header;
coutln('|06 credits on hand |14:|07 '+itos(players.pcredits));
coutln('|06 credits in bank |14:|10 '+itos(players.pcreditsbank));
coutln('');
cout('|06 how much would you like to withdraw? :|14 ');
input := instr('',10,true);
if stoi(input) <> players.pcreditsbank then begin
coutln('|15 invalid entery');pause;exit;end;
if not stoi(input) <> players.pcreditsbank then begin
a := players.pcreditsbank - stoi(input);
players.pcreditsbank := a;
b := players.pcredits + stoi(input);
players.pcredits := b;
coutln(' |15thank you transaction closed....');
savep(currentp);
pause;
exit end;
end;
|08 .|05·|13∙|15Dr|07e|08am Ma|07st|15er|13∙|05·|08.
|08 °∙|05·|13∙° |13°∙|05·|08∙°
|11 DoRE|03!|11ACiDiC|03!|11Demonic
|08<|15dreamland|09.|15darktech|09.|15org|08>
--- Mystic BBS v1.12 A20 (Windows)
* Origin: --[!dreamland BBS dreamland.darktech.org (44:100/0)
|