18.09.2017, 14:25
PS. This is only an Illustrator code
but 4d Don't work :/ Is there any other way to solve this one? I'm out of idea instead doing
I just need to do like this
PS. I know that my coding flaw is sux I hope you guys understand what I'm trying to say
Код:
#define MAX_OBJECT 100 #define LIMIT_ANOTHERTEST 10 enum e_testinfo { e_ObjectId, Float:e_ObjectPos[3] }; new ObjectData[MAX_OBJECT][MAX_PLAYERS][e_testinfo]; enum anothertestinfo { e_ObjectName[64], e_ObjectQuantity }; new AnotherObjectData[MAX_OBJECT][MAX_PLAYERS][LIMIT_ANOTHERTEST][anothertestinfo]; // I need this to connect to enum e_TestInfo for looping and saving
Код:
enum anothertestinfo { e_ObjectName1[64], e_ObjectQuantity1, e_ObjectName2[64], e_ObjectQuantity2, e_ObjectName3[64], e_ObjectQuantity3, e_Object...... e_Object..... }; new AnotherObjectData[MAX_OBJECT][MAX_PLAYERS][anothertestinfo]; // then use it like for(new x = 0; x < MAX_OBJECT; x ++) { format(AnotherObjectData[x][playerid][e_ObjectName1], 64, "Nothing"); AnotherObjectData[x][playerid][e_ObjectQuantity1] = 0; .... 10 Codes of AnotherObjectData[x][playerid][e_ObjectName1] // This structured slowing my compiler. }
Код:
for(new loop = 0; loop < 10; loop++) { for(new x = 0; x < MAX_OBJECT; x ++) { // format(AnotherObjectData[x][playerid][loop][e_ObjectName], 64, "Nothing"); // something like this AnotherObjectData[x][playerid][loop][e_ObjectQuantity] = 0; } }