DavidPH / GDCC

Game Data Compiler Collection
Other
39 stars 7 forks source link

Disallow using latent functions in user-defined functions #10

Open PkmX opened 8 years ago

PkmX commented 8 years ago

Currently, gdcc-acc accepts calling latent functions (such as delay) in user-defined functions (which is disallowed in ZDoom's acc):

function void foo(void) {
    delay(1);
}

The compiled ACS code can make Zandronum 2.1.2 and 3.0-alpha to crash when run.

DavidPH commented 8 years ago

This is allowed because some targets do allow delays in ordinary functions, so it cannot be turned into an error. I do want to add a warning for delays in non-void async script functions, though. Once I have that I can add an Eternity target and issue a warning for delays in ordinary functions for ZDoom and Zandronum targets.