jonjons
Member
hello
Is there a way to create a struct with a var that contains an array of values ?
Example:
I know how this is done in JSON, i just cant do the oposite make this in GM and pharse it on to JSON... i dont understand the gm logic, the examples in the blog were all rushed, and dont have any pratical use, except for doing things, that were already ways to do it.
Is there a way to create a struct with a var that contains an array of values ?
Example:
Code:
My_Bannanas:
{
Bannana1:
{
Bannana1CoordsA:
[
b1X: 10,
b1Y: 15
]
Bannana1CoordsB:
[
b2X: 20,
b2Y: 25
]
Bannana1CoordsC ..etc...
}
Bannana2:
{
Bannana2CoordsA:
[
b1X: 30,
b1Y: 35
]
Bannana2CoordsB:
[
b2X: 40,
b2Y: 45
]
Bannana2C ..etc...
}
}
var _xx = 100;
mystruct = {
a : 10,
b : "Hello World",
c : int64(5),
d : _xx + 50,
e : function( a, b )
{
return a + b;
},
f : [ 10, 20, 30, 40, 50 ]
};
mystruct = {
a : 10,
b : "Hello World",
c : int64(5),
d : _xx + 50,
e : function( a, b )
{
return a + b;
},
f : [ 10, 20, 30, 40, 50 ]
};