-setconstants Argument not Working with Compiled Executables

Report any Hollywood bugs here
Post Reply
Posts: 280
Joined: Sun Feb 21, 2010 1:28 am

-setconstants Argument not Working with Compiled Executables

Post by PEB » Tue Nov 20, 2018 5:13 am

I'm not sure if this is a bug or not, because I'm not sure if the -setconstants argument is supposed to work with compiled executables; but it would be really helpful if it could.

For example, it would allow preprocessor commands (such as choosing to use a docky or not through @OPTIONS) to be much more flexible using @IF.

As of right now, this can be done on uncompiled scripts run through Hollywood. But once the script is compiled, the executable does not accept custom -setconstants arguments from the console.

User avatar
Posts: 3355
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany

Re: -setconstants Argument not Working with Compiled Executables

Post by airsoftsoftwair » Tue Nov 20, 2018 6:29 pm

Sorry, but this is conceptually impossible. Constants are resolved at compile time and are written to the applets as hard-coded values. In an applet you'll only find bytecode which has all references to constants already resolved so it's impossible to do what you want. The only exception is the GetConstant() function. This could be made to recognize constants passed to the executable using "-setconstants" but that won't solve your problem.

Post Reply