Sgqvur
FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
- Reaction score
- 62
Can someone confirm this, or am I "missing" something
I use the following script to test:
I use the following script to test:
struct S
readonly static integer array ARRAY[12] // [12] is not needed
endstruct
function main takes nothing returns nothing
local S v = S.create()
set v.ARRAY[0] = 0 // compiles to: set s__s__S_ARRAY[0]= 0, but should give error, not just because it's readonly but also because it's a static member right?
set S.ARRAY[1] = 1 // cimpiles to: set s__s__S_ARRAY[1]= 1
endfunction
I think in other programming/scripting languages that have some oo features allow static members to be referenced only by
the class/struct's name but not by instance variables, I guess vJass is an exception.
Code:class C { static integer si = 0 } ... C.si = 4; // works as expected C c = <get C instace> c.si = 1; // doesn't work as expected ...