"new" just creates a new variable of local scope. If it's used on the top-level, it's effectively a global variable with respect to the plugin's own code. When declared in this scope, there is no runtime execution happening so only constant expressions are allowed. When you create a variable in a local scope that is processed at runtime (like inside of a function) then you can initialize it with any normal code.
"new", "static", and "public" are mutually exclusive expressions so I'm not sure why you have any combination of those. References:
Quote:
Originally Posted by Pawn Language Guide
To declare a global variable as static, replace the keyword new by static.
|
Quote:
Originally Posted by Pawn Language Guide
Global “simple” variables (no arrays) may be declared “public”
in two ways:
⋄ declare the variable using the keyword public instead of new;
...
|
__________________