SRL Archive - OSR Help

Why dont this work?


rya

2010-06-27 13:06:57

Well im trying to set colours and it wont compile im not sure whats wonrg but i think its simple

Procedure SetColour(What:String);
Begin

Case What Of
{Red Colour Of Chicken}
'Red' := Begin
Colour := 1450142
Toll := 7
Hue := 0.07
Sat := 0.08
End;

End;
If there is a better way to do this i would be gald to hear it

Thanks

~Rya

MylesMadness

2010-06-27 13:08:48

Procedure SetColour(What:String);
begin
Case What of
{Red Colour Of Chicken}
'Red' :
begin
Colour := 1450142
Toll := 7
Hue := 0.07
Sat := 0.08
end;
end;
Cases use : not :=

FrostFyr

2010-06-28 00:31:08

ACtually Myles, he's already using : then he opened a begin tag and didn't close it (According to the program) remember to ALWAYS close your case statements :)

Procedure SetColour(What:String);
begin
Case What of
'Red' :
begin
Colour := 1450142;
Toll := 7;
Hue := 0.07;
Sat := 0.08;
end;
end;
end;

i luffs yeww

2010-06-28 01:17:45

^ Umm.. OP has his as 'Red' := begin (etc.), when it should be 'Red': begin.

FrostFyr

2010-06-28 03:59:04

My bad i figured Myles had quoted it since it still had an error :p
Thats my bad but at least it work now :)