tooltiperror
Super Moderator
- Reaction score
- 231
Structs are just Numbers, which is why you can only have 8192. (Or whatever it is.)
When you declare a struct, you create a number.
Now, let's add in some more complications.
You may need to work it out better than that, but that`s a basic idea.
When you declare a struct, you create a number.
JASS:
.
struct a
endstruct
struct b
endstruct
Now, let's add in some more complications.
JASS:
.
struct a
string c // This will create a string array called C.
endstruct
struct b
string d // This will create a string array called D.
endstruct
function example takes nothing returns nothing
local a = astruct.create() // Alright, astruct is now just a number: 4 for example.
local a = bstruct.create() // This will be five.
set astruct.c = "Hello, there." // Now, we got a kinky little thing right here. Here we set four in the string array C (astruct = 4, remember?) e.o our messag.
set bstruct.c = "I hate JASS." // Now, this sets C[5] to our message.
endfunction
You may need to work it out better than that, but that`s a basic idea.