Section One BBS

Welcome, Guest.


Subject: pascal question Date: Fri Jun 17 2016 04:44 am
From: dream master To: All

ok for some reason in my lemonade igm for darkness the atm is not working.
here is the code:

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
coutln('|15   invalid entery');pause;exit;
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;

nothing is being subtracted from credits in bank.

  |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)

Previous Message       Next Message
Replies: pascal question (Gryphon)