goto label <Label>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

goto label <Label>

Post by mark_a_condren » Fri, 10. Sep 10, 16:42

goto label <Label>


<Label> = A predefined 'label' in your script.

Causes the script execution to jump to the point defined by the <Label> you specify.


Example:

write to player logbook = 1
write to player logbook = 2

goto label skip.numbers
write to player logbook = 3
write to player logbook = 4

skip.numbers:
write to player logbook = 5

In this case 1, 2 and 5 would be written to the logbook due to the 'goto label' causing 3 and 4 to be missed.


Command Location:

Alex Vanderbilt
Winner X3 Sektorquest
Posts: 2127
Joined: Thu, 4. May 06, 12:07
x3tc

[TiP][49] 286643

Post by Alex Vanderbilt » Sat, 2. Oct 10, 17:42

goto label <Label>

<Label> = Eine vordefinierte Bezeichnung oder Markierung im Skript.

Es wird bewirkt, dass die Ausführung des Skripts zu dem Punkt springt, der im <Label> definiert ist.

Beispiel:

write to player logbook = 1
write to player logbook = 2

goto label skip.numbers
write to player logbook = 3
write to player logbook = 4

skip.numbers:
write to player logbook = 5

In diesem Fall würden aufgrund der Markierung skip.numbers: 1; 2 und 5 in das Logbuch geschrieben. 3 und 4 würden ausgelassen werden.


Zu finden unter:

User avatar
Capux
Posts: 2456
Joined: Sat, 31. Oct 09, 21:17
x4

[39] 286643

Post by Capux » Thu, 21. Oct 10, 21:59

goto label <Label>


<Label> = Una 'label' predefinita nel tuo script.

Istruzione di salto incondizionato: sposta l'esecuzione dello script in una parte di codice anteceduta dalla <Label> che specifichi nell'istruzione.


Esempio:

write to player logbook = 1
write to player logbook = 2

goto label skip.numbers
write to player logbook = 3
write to player logbook = 4

skip.numbers:
write to player logbook = 5

In questo caso, 1 e 2 vengono scritti nel diario di bordo, mentre 3 e 4 vengono saltati perchè l'istruzione 'goto label' sposta l'esecuzione alla riga immediatamente successiva ad essa, scrivendo come nuovo numero sul diario di bordo il 5.


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”