Test code:
Code: Select all
44 override void Tick() {
45 array<String> testStrings;
46
47 testStrings.append("A");
48 testStrings.append("B");
49 testStrings.append("C");
50
51 foreach (item : testStrings) {
52 console.printf("This string: %s", item);
53 }
54
55 Super.Tick();
56 }
Example provided on ZDoom.org wiki:...
LoadActors: Load actor definitions.
Script error, "<file.zs>" line 51:
Unexpected '{'
Expecting ';'
Code: Select all
Array<Actor> things;
foreach (mo : things)
{
if (mo)
{
// Do something
}
}
...
LoadActors: Load actor definitions.
Script error, "<file>.zs" line 52:
Unexpected identifier
Expecting ';'