Problem: I have the following ZScript (minimal example to demonstrate)
Code: Select all
class TestHud : BaseStatusBar
{
override void Draw(int state, double TicFrac)
{
Super.Draw(state, TicFrac);
Test();
}
private void Test()
{
}
}
Code: Select all
Script error, "zscript.txt:ZSCRIPT" line 6:
Can't call play function test from ui context
Unfortunately, it doesn't work; when I change "private void Test()" to "private ui void Test()", GZDoom says:ZZYX in another thread wrote:...ok, that's extremely weird. Are statusbars not ui? Why? I see BaseStatusBar is declared as ui but it doesn't work apparently.
Anyway, this particular issue can be fixed by explicitly marking your draw function as ui (e.g. protected ui void DrawFullScreenStuffCustom).
Code: Select all
Script error, "zscript.txt:ZSCRIPT" line 9:
Unexpected identifier
Expecting ';' or ','
If anyone knows what I should do, any kind of help will be greatly appreciated