insert a free variable (i.e. "i") in conditional orders
Posted: 01 Sep 2014 21:59
Hi to all,
I am not an English mothertongue user so be patient for my bad language. I've looked for this topic finding nothing.
I'm wondering if it is possible (and if not it would be so usefull) to insert a "for next" routine or a "counter" or, even, a variable into orders.
This need is because i like to manage ships in ancient era (1700) in very complex order lists (150 or more orders).
I.e. ive got a port with 3 different product (coal, grain and passengers) unloaded in the same port.
I wont only one route with 10 ships that auto balance in needs. So i do:
1 goto Depot - convert to passengers
2 goto LoadPort
3 if load rate is less then 50% jump on 6
4 goto UnloadPort
5 goto 1
6 goto loadPort unload without load
7 goto depot - convert to coal
...
Now i have to repeat the same instruction 3 times
Last order goto dep and stop
If i could insert a variable, orders could be more complex and thinks would be funnyer
(Jump means conditional order - goto is a ship order and not programmers language code)
1 i= 0
2 i=i+1
3 if i =1 ; goto dept - passengers
4 if i =1; jump 11
5 if i =2; goto dept - coal
6 if i=2; jump 11
7 if i=3; dept - grain
8 if i=3; jump 11
9 if i=4; goto dept - stop
10 any case jump to 1
11 goto loadport
12 load rate < 50 jump 15
13 goto unloadport
14 jump 11
15 goto loadPort unload without load
16 jump 2
I am not an English mothertongue user so be patient for my bad language. I've looked for this topic finding nothing.
I'm wondering if it is possible (and if not it would be so usefull) to insert a "for next" routine or a "counter" or, even, a variable into orders.
This need is because i like to manage ships in ancient era (1700) in very complex order lists (150 or more orders).
I.e. ive got a port with 3 different product (coal, grain and passengers) unloaded in the same port.
I wont only one route with 10 ships that auto balance in needs. So i do:
1 goto Depot - convert to passengers
2 goto LoadPort
3 if load rate is less then 50% jump on 6
4 goto UnloadPort
5 goto 1
6 goto loadPort unload without load
7 goto depot - convert to coal
...
Now i have to repeat the same instruction 3 times
Last order goto dep and stop
If i could insert a variable, orders could be more complex and thinks would be funnyer
(Jump means conditional order - goto is a ship order and not programmers language code)
1 i= 0
2 i=i+1
3 if i =1 ; goto dept - passengers
4 if i =1; jump 11
5 if i =2; goto dept - coal
6 if i=2; jump 11
7 if i=3; dept - grain
8 if i=3; jump 11
9 if i=4; goto dept - stop
10 any case jump to 1
11 goto loadport
12 load rate < 50 jump 15
13 goto unloadport
14 jump 11
15 goto loadPort unload without load
16 jump 2