Scripting:Flotten benennen
Aus STNE-Wiki
(Unterschied zwischen Versionen)
K (→Skriptcode) |
Xenon (Diskussion | Beiträge) K (→Skriptcode) |
||
Zeile 19: | Zeile 19: | ||
{ | { | ||
var Ship as CMyShip = ShipEnum.Current | var Ship as CMyShip = ShipEnum.Current | ||
- | Ship.Name ='' & names[i] | + | Ship.Name = <nowiki>''</nowiki> & names[i] |
i=i+1 | i=i+1 | ||
} | } |
Version vom 17. Juni 2006, 14:34 Uhr
fertige Scripte | Anleitungen und FAQ | Überblick über die Scripting-Sektion | Hilfen zum Arbeiten im Wiki |
Flotten-Benennung
Skriptcode
VAR i AS integer VAR names[] AS String = { 'name1', 'name2', 'name3', 'name4' } i=1 VAR Flotte AS new CMyFlotte( idDerFlotte ); VAR Schiffe AS CShipList = Flotte.Ships VAR ShipEnum AS IEnumerator = Schiffe.GetEnumerator(); WHILE (ShipEnum.MoveNext()) { var Ship as CMyShip = ShipEnum.Current Ship.Name = '' & names[i] i=i+1 }