# Beginner Pascal Problem

http://shrib.com/SgF1VsA3 <-- the code is here don't ask me why, I couldn't post it here without getting it all jumbled up We're having a problem with this code.

We're beginner coders so please don't rape us in the comments.

The problem is as follows and not even our teacher can fix it ( insert dull face here).

What is happening when we try to run the program and it reaches the part where it compares the variables ( if var1=var2 etc..etc..) and it says

Error:Incompatible types: got "Boolean" expected "Int64"

If I change var1,var2 and var3 to boolean it still gives me the same problem. How can we fix this?

Cheers Luís and Luigi

dont you have to assign the "       then (bet1*3);"

to a variable?

im not realy familiar with pascal

something to do with the "or" that's a boolean operator so it's looking for boolean values?

Try adding brackets around each of if conditions like this

if (var1 = var2) or (var2 = var3) or (var1 = var3)

Hey man thanks A LOT for your input!

I tried what Dissentient said but it didn't seem to work, but I tried it again and it worked finally, now the problem I'm getting is that after comparing the two variables

if
var1 = var2
and
var3 = var2
then (bet1*3);

when I write then bet1* 3 (because if the 3 numbers are equal I want to multiply the bet by 3) it says illegal expresion.

I tried adding brackets around the number 3 and bet1 spacing it but nothing!

Hey man I can't thank you enough it worked, I tried that before but for some reason it gave me a whole bunch of other errors but oh well.

well now I'm getting a new one which is as follows:

if
var1 = var2
and
var3 = var2
then (bet1*3);

when I write then bet1* 3 (because if the 3 numbers are equal I want to multiply the bet by 3) it says illegal expresion.

I tried adding brackets around the number 3 and bet1 spacing it but nothing!

Thanks again man for your fast response!

try

bet1:=bet1*3

(because if the 3 numbers are equal I want to multiply the bet by 3) it says illegal expresion.

Well, it is.

The proper expression is

if (var1 = var2) and (var2 = var3) then bet1 := bet1 * 3;

Any statement after 'then' should be written like any other statement. You can never write something like bet1 * 3, an assignment statement should have left side and right side. The closest thing would be Bet1 *= 3; in languages like C.

By the way, can you please make an array as in

Bet : Array[1..10] of Integer;

with referring to individual variables as Bet[1], Bet[2], etc...

It will make your life much easier if you are going to use those variables in future.