----------------------------------- vdragon88 Tue Jan 13, 2004 6:40 pm Bank program ----------------------------------- I'm trying to make a bank program... It starts off with a login with a pin#... Then there are 4 options... 1.Deposit 2.Withdraw 3.View Balance 4.Exit The default balance is $500.00 I wasnt able to make a deposit then withdraw(vice versa) and look at the balance to see that its updated. If I make one way work, the other wont work... I keep getting errors like: "balance" is not a procedure hence cannot be used. Plz help me ----------------------------------- Tony Tue Jan 13, 2004 6:42 pm ----------------------------------- well you see... balance is not a procedure. It's probably a variable :? Try using put balance I donno :? some details will be nice, such as what type of variable balance is, and maybe the line of code that generated the error ----------------------------------- shorthair Tue Jan 13, 2004 6:57 pm ----------------------------------- just give some background , this program is very straight forward , Il write the whole thing for you , if you lick your monitor and then rub your nose on the power supply while its on? :D ----------------------------------- Cervantes Tue Jan 13, 2004 6:59 pm ----------------------------------- I hope your not suggesting he do those 2 things at once... that would hurt. :lol: ----------------------------------- DanShadow Tue Jan 13, 2004 7:33 pm ----------------------------------- It wouldnt hurt to do both those at once... *cough*.. I suggest trying it, it could prove useful. Like, you never know if its good until you try it, and if its bad, you've learned an valuable and painful lesson. :twisted: And seriously, next time you post, please put a little "snippet" of your code specifically a couple lines before and after where your error shows up, you'll probably get easier results, heh. But Tony is most likely right, balance is more than likely a variable in your code, so your trying to turn a variable into a procedure, which cant be done...and make sure you dont have a procedure and a variable with the same name...that could cause difficulties, heh. ----------------------------------- Maverick Tue Jan 13, 2004 7:37 pm ----------------------------------- This program doesnt seem that hard. Post your code. ----------------------------------- Andy Tue Jan 13, 2004 7:57 pm ----------------------------------- give us what u have so far and we'll fix it ----------------------------------- vdragon88 Wed Jan 14, 2004 2:39 pm ----------------------------------- %Author: Victor Tran %Description:Bank account application that can be used by a bank machine. %Filename: Bankacc.t setscreen ("graphics.vga") const username:="Victor" const pwd:="830" var uname:string var passw:int var count:=0 var win:=Window.Open("position:top,center,graphics:1000;700") Draw.Box (980,0,680,0,1) Draw.Fill (970,680,1,1) procedure userLogin loop put "Username..." get uname if uname=username then return else put "Invalid username. ';'';'" count +=1 end if if count=3 then loop put "You have tried 3 times and could not get in. Please try another day.... XD (|-| 4 X 0 12) XD!" delay(1000) Window.Close(win) end loop end if end loop end userLogin procedure userPwd loop put "Password..." get passw if passw=830 then put ":) Login succesful :)" return else put " Access Denied! ';'';'" count +=1 end if if count=3 then loop put "You have tried 3 times and could not get in. Please try another day.... XD (|-| 4 X 0 12) XD" delay (1000) Window.Close(win) end loop end if end loop end userPwd userLogin userPwd cls Draw.Box (980,0,680,0,3) Draw.Fill (970,680, 3,3) Draw.FillMapleLeaf(50,175,250,300,4) Draw.FillMapleLeaf(260,175,450,300,4) const identifier := 4 Music.Play ("ee-ee-edcc") Music.Play ("eee>ee-ee-edcc