Kategorie: Script
/ Strings
Ab Engineversion: 5.1 OC
%[Länge][.Präzision]Typ Bis auf den Typ sind also alle Parameter optional. Der Typ gibt den Datentyp an, den der Parameter hat. Möglich sind folgende Werte: | Typ | Bedeutung |
|---|---|
| d | Ganzzahl (int) |
| x | Ganzzahl (int), hexadezimale Ausgabe (0123456789abcdef) |
| X | Ganzzahl (int), hexadezimale Ausgabe (0123456789ABCDEF) |
| i | id (Bei IDs funktionieren die restlichen Parameter wie Länge und Präzision nicht!) |
| s | Zeichenkette |
| v | Beliebig. Vor allem nützlich zur Fehlersuche. |
Log(Format("Hello, %s.You have %d Clonks!", GetPlayerName(0), GetCrewCount(0)));
Log(Format("'%3d'", 1));
Log(Format("'%3.2d'", 5));
Log(Format("'%.2s'", "test"));
Log(Format("'%03d'", 12));