Cancel
Showing results for 
Search instead for 
Did you mean: 

set custom attributes

Experimenter
Experimenter

Hello,

 

I am a student in germany and me an my group have to simulate an airport.

We have no idea how to solve the following problem (our basic knowledge is quite poor and asking our prof means getting much minuspoints) :

 

Vehicles are generated by a source, after leaving the source we want to give them an attribute:

40% should go to AirFrance

60% to Lufthansa

(random assignment)

 

In the custom attributes of the vehicles we sad:

Name: LH

Wert: true

Typ: boolean

 

We used a method, but in line 2 it allways said there is a 'Syntaxfehler':

is
zahl: real;
do
zahl:=z_gleich(5,0,1)
if zahl <0.4 then
@.LH:=true
else
@.LH:=false;
end;
end;

 

 

We hope that anyone can help us, thanks

2 REPLIES

Re: set custom attributes

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
i guess you need to deactivate the new syntax option for the method
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: set custom attributes

Gears Phenom Gears Phenom
Gears Phenom

Hello

 

You are missing some semicolons from your method.

 

is
zahl: real;
do
zahl:=z_gleich(5,0,1);
if zahl <0.4 then
@.LH:=true;
else
@.LH:=false;
end;
end;

JamesM