<RetVar/IF> get PID

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

<RetVar/IF> get PID

Post by mark_a_condren » Wed, 8. Sep 10, 17:43

[skip|else] if [not]|while [not]| <RetVar/IF> = get PID


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Command return, with an 'if' statement used it will be TRUE (1) if condition passes or FALSE (0) if it fails, otherwise if you use a Variable it will be the PID as an integer.


Every time a script runs, it is given a unique identifier called 'pid'.
The term pid traces its routes to Unix systems where this meant “process ID”.
The distinction between a process and a task in X3 - TC is a thin one.
A task ID is a short form to reference a process that is attached to a given object to perform a given set of functions.
A process ID is the internal reference number given each time a new instance of a script is instantiated.
Different ships will have scripts that run under identical task ID numbers.
A process ID number for a running process will never be the same as the process ID for any other currently running process.


Example:

$PID = get PID

$PID will be an integer representing the scripts current PID.


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 286471

Post by X2-Illuminatus » Mon, 20. Sep 10, 19:53

[skip|else] if [not]|while [not]| <RetVar/IF> = get PID


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Rückgabewert des Befehls, mit einer 'if' Anweisung wird dieser TRUE (1) (wahr) sein, wenn die Bedingung erfüllt ist oder FALSE (0) (falsch), wenn nicht. Andernfalls, wenn eine Variable genutzt wird, wird er die PID als ganze Zahl zurückgeben.

Jedes Mal wenn ein Script läuft, erhält es eine einzigartige Bezeichnung, die sogenannte "pid". Der Ausdruck hat seinen Ursprung in Unix Systemen, in denen er "Prozess ID" bedeutet. Der Unterschied zwischen einem Prozess und einem Task ist in X3:TC nur sehr klein.
Eine Task ID ist eine Kurzform, die auf einen Prozess verweist, der einem bestimmten Objekt zugewiesen ist, um eine Reihe von Funktionen auszuführen.
Eine Prozess ID ist die interne Referenzzahl, die jedes Mal zugewiesen wird, wenn eine neue Scriptinstanz erstellt wird.
Verschiedene Schiffe haben Scripte, die unter derselben Task ID laufen. Eine Prozess ID für einen laufenden Prozess hingegen wird nie die gleiche wie für zurzeit andere laufende Prozesse sein.


Beispiel:

$PID = get PID

$PID wird die zurzeit auf dem Script laufende PID als ganze Zahl sein.


Zu finden unter:

User avatar
Juggernaut93
Posts: 2897
Joined: Sun, 17. Jul 11, 21:03
x4

[39]286471

Post by Juggernaut93 » Fri, 1. Jun 12, 17:21

[skip|else] if [not]|while [not]| <RetVar/IF> = get PID


[skip|else] if [not]|while [not]| = La possibile istruzione 'Condizionale' che può essere usata con questo comando.
<RetVar/IF> = Ciò che restituisce il comando; se si usa un'istruzione 'if' sarà TRUE (1) se la condizione si verifica o FALSE (0) se fallisce; se invece usi una variabile, essa assumerà il valore intero del PID.


Ogni volta che si esegue uno script, ad esso viene assegnato un identificatore univoco chiamato 'PID'.
Il termine PID risale ai sistemi Unix, nei quali sta a significare "ID del Processo" (Process ID).
La distinzione tra un processo e un task in X3 - TC è sottile.
Un ID di task è una forma breve per referenziare un processo assegnato ad un dato oggetto per eseguire un certo set di funzioni.
Un ID di processo è il numero interno di riferimento assegnato ogni volta che viene istanziata una nuova istanza di uno script.
Navi differenti avranno script in esecuzione con identici ID di task.
Un ID di processo per un processo in esecuzione non sarà mai lo stesso di un altro processo in esecuzione.


Esempio:

$PID = get PID

$PID sarà un intero che rappresenta il PID corrente di uno script.


Posizione del comando nella lista:

Locked

Return to “MSCI Reference”