- Code: Select all • Expand view
class Test
{
void TestFunc()
{
let p = players[consoleplayer];
}
}
- Code: Select all • Expand view
Script error, "zscript.txt:ZSCRIPT" line 5:
Cannot initialize non-scalar variable p here
On the other hand, this works fine:
- Code: Select all • Expand view
class Test
{
void TestFunc()
{
PlayerInfo p = players[consoleplayer];
}
}
It appears this happens when the declared type of the assigned value is prefixed with "@". For example, some global variables (in "struct _") are declared like this.