|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
mark_a_condren

Joined: 03 Aug 2005 Posts: 1384 on topic Location: Newcastle - Australia

|
Posted: Thu, 9. Sep 10, 15:09 Post subject: <RetVar/IF> = read text: page id = <Var/Number>, id = <Var/Number> exists |
|
|
[skip|else] if [not]|while [not]| <RetVar/IF> = read text: page id = <Var/Number>, id = <Var/Number> exists
[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 TRUE / FALSE as an integer.
<Var/Number> = This is the page id number for the required XML file. You can enter this number directly in or via a variable, but in both cases it must be an integer.
<Var/Number> = This is the text id number for the required entry in the XML file. You can enter this number directly in or via a variable, but in both cases it must be an integer.
Returns TRUE if
- the TFile exists in the proper language
- its XML format is readable
- the TFile has been loaded already
- the text ID exists
Besides the obvious it can also be used to check for the TFiles of a script being installed properly.
Example:
if = read text: page id = 9999, id = 100 exists
$text = read text: page= 9999 id = 100
$ship set name to $text
end
This will check the text entry exists and is readable before using it.
Command Location:
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X2-Illuminatus Moderator (Deutsch)

Joined: 02 Apr 2006 Posts: 14816 on topic

|
Posted: Tue, 28. Sep 10, 23:16 Post subject: [TiP][49] 286543 |
|
|
[skip|else] if [not]|while [not]| <RetVar/IF> = read text: page id = <Var/Number>, id = <Var/Number> exists
[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 TRUE / FALSE als ganze Zahl zurückgeben.
<Var/Number> = Dies ist die page id Zahl der benötigten XML-Datei. Du kannst diese Zahl direkt in oder über eine Variable eingeben, aber in beiden Fällen muss es eine ganze Zahl sein.
<Var/Number> = Dies ist die text id Zahl für den benötigten Eintrag in der XML-Datei. Du kannst diese Zahl direkt in oder über eine Variable eingeben, aber in beiden Fällen muss es eine ganze Zahl sein.
Gibt TRUE (wahr) zurück, wenn
- die T-Datei in der richtigen Sprache existiert
- deren XML Format lesbar ist
- die T-Datei bereits geladen wurde
- die Text ID existiert
Neben dem Offensichtlichem kann dies auch genutzt werden, um zu überprüfen, ob eine T-Datei eines Scripts korrekt installiert wurde.
Beispiel:
if = read text: page id = 9999, id = 100 exists
$text = read text: page= 9999 id = 100
$ship set name to $text
end
Dies wird vor der Nutzung des Texteintrages überprüfen, ob er existiert und lesbar ist.
Zu finden unter:
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|