Hey all,
I am working on a custom stat system to use with some jass spells that I wrote. All it really has to be is a couple of real variables stored in a struct and I want to make a struct for each player.
I have the structure compiling successfully and its just a bunch of different real variables. How would I go about initializing a struct for each player? So far I have:
scope CSSInit intializer Init
globals
[Part A]
endglobals
private function Init takes nothign returns nothing
[Part B]
endfunction
endscope
My initial thought was to put it in globals at [Part A], but im not quite sure how. At [Part A] I wrote "heroData array hData", heroData being the name of the struct. then in [Part B] i wrote "set hData[0].meleeDamageModifier = 1.0" and it doesnt compile.
I guess what I am asking is whether I am making a simple syntax error, if I am making things more complicated than they need to be, or if someone knows a better solution
Thanks in advance!
-enyeas
I am working on a custom stat system to use with some jass spells that I wrote. All it really has to be is a couple of real variables stored in a struct and I want to make a struct for each player.
I have the structure compiling successfully and its just a bunch of different real variables. How would I go about initializing a struct for each player? So far I have:
scope CSSInit intializer Init
globals
[Part A]
endglobals
private function Init takes nothign returns nothing
[Part B]
endfunction
endscope
My initial thought was to put it in globals at [Part A], but im not quite sure how. At [Part A] I wrote "heroData array hData", heroData being the name of the struct. then in [Part B] i wrote "set hData[0].meleeDamageModifier = 1.0" and it doesnt compile.
I guess what I am asking is whether I am making a simple syntax error, if I am making things more complicated than they need to be, or if someone knows a better solution
Thanks in advance!
-enyeas