AdamGriffith
You can change this now in User CP.
- Reaction score
- 69
Hi,
I was just reading over the manual thing and found this which I didn't understand:
I was wondering wether there was a typo and it should say set A.y = 8 or can you do what he has done?
I was just reading over the manual thing and found this which I didn't understand:
JASS:
Structs
Structs introduce Jass to the object oriented programming paradigm.
I am unable to explain them without making an example first:
struct pair
integer x
integer y
endstruct
function testpairs takes nothing returns nothing
local pair A=pair.create()
set A.x=5
set A.x=8
call BJDebugMsg(I2S(A.x)+" : "+I2S(A.y))
call pair.destroy(A)
endfunction
As you can see, you can store multiple values in a single struct, then you can just use the struct as if it was another Jass type, notice the . syntax which is used for members on most common languages.
I was wondering wether there was a typo and it should say set A.y = 8 or can you do what he has done?