#1
Yeah, I'm having trouble with my Computing coursework. Logically, my first idea was to ask the pit for answers.

For anyone who has programmed in Pascal/Delphi, can you help me understand what's gone wrong here?

If LitresNUM<=50 THEN
showmessage('No-one has used the pump since last time!')
else
[color="Red"]If Unit2.Form2.Button1.Visible:=True Then[/COLOR]
showmessage('Wait till the customer has replaced the nozzle, you fool pete!')
else
<rest of procedure>


Delphi seems to have a problem with that line, and returns the error

"Unit3.pas(97)E2012 Type of expression must be BOOLEAN"

Any ideas?

EDIT:

Solved. Now, if you wish, you can use this thread to ask about other programming problems in any language.
_____________________________________________

Last edited by Your Mother : Today at 03:44 PM
Last edited by Metallica708 at Mar 2, 2008,
#4
Quote by GiantRaven
Dude you asked me before you asked the pit


Dammit, you've made me lose the pit's collective heart and mind now
_____________________________________________

Last edited by Your Mother : Today at 03:44 PM
#5
hmm............i dunno
Quote by AAAAAAAAAARGH
Gold/Silver/Crystal.

Simply because I could breed the pokemon, and act out my sick sexual fantasies between Dittos and Chanseys.


Quote by bequickorbedead
She had sex..with my...AIDS?
#6
A programming friend of mine says that you're trying to assign a variable (:=) where you want a comparison (=). So just delete the colon, and you should be fine.
#7
sorry i only know some java but i think it might be

If Unit2.Form2.Button1.Visible:=True Then

the Then at the end should be all capse because the first one you did at the beginning was
GEAR
Jackson JS30WR with EMG 81/85
Dean Vendetta
Peavey Valveking 212 (tung sol 12ax7 - JJ6l6gc)
Ibanez TS9
Boss TU-2
Boss NS-2

Quote by insanitytheband
Hey Im Looking For Some Tech Death Metal In D

Quote by alexyeung
try anything form avenged sevenfold


wtf?
#9
yeah i dont code in Delphi but the error suggests you've just made a syntax error
Hi

Quote by iceman95
Fiddler is a god!!!! omg that's a good movie
#10
Quote by blue_strat
A programming friend of mine says that you're trying to assign a variable (:=) where you want a comparison (=). So just delete the colon, and you should be fine.


Awesome. Thanks a lot (it works now).

EDIT:

Another problem has appeared (You can tell i'm not too good at this)

I thought I had programmed it so that it would only do 1 of the 3 things involved in the if statement, but for some reason if the error comes up saying "Wait till the customer has replaced the nozzle, you fool pete!" it goes ahead and does whatever I was trying to prevent it to do.

If you'd find it easier if I just copied along the whole procedure, please say.
_____________________________________________

Last edited by Your Mother : Today at 03:44 PM
Last edited by Metallica708 at Mar 2, 2008,
#11
"Put begin and end around the blocks and use indentation to make it clearer what's happening where".
#12
HEYY!! i need help!!! i need to make a tic tac toe game on delphi but i have no idea how to use this ****!! can someone help me??
#13
so... anyone is going to help me??
i'm with the same problem since 2 weeks ago
please

i will love the one who help me
#14
sorry mate.. i don't use delphi..

i only know visual basic
"Help me God. I'm so tired. I need my sleep. I need 8 hours a day ...and about 10 at night and i'm good..."