Size gets big +rep
#4

Quote:
Originally Posted by iBots
Посмотреть сообщение
I have a system, that players can buy like a business, and each business has 100 slots, like in the enum:
pawn Код:
businessthing1[100],
businessthing2[100],
businessthing3[100],
There is no way to remove business2 and business3 so dont suggest that,the main problem is i have to loop over them in order to do few things with them, and looping them makes the size of the max very big, is there a way to fix?
PHP код:
enum E_BUSINESS {
     
BUSINESS_NAME1[MAX_PLAYERS][24], // is string
     
BUSINESS_NAME2[MAX_PLAYERS][24], // ...
     
BUSINESS_NAME3[MAX_PLAYERS][24],  // eof string
     
BUSINESS_COST1[MAX_PLAYERS// is integer
     
BUSINESS_COST2[MAX_PLAYERS// ...
     
BUSINESS_COST3[MAX_PLAYERS// eof integer
}
new 
business[100][E_BUSINESS]; // declaration
business[0][BUSINESS_NAME2][playerid] = "My Bussuname"// set varlue
business[0][BUSINESS_COST2][playerid] = 10000;
// Test
for (new i100i++) {
      
printf("index %d bussuname '%s' cost $%d"ibusiness[i][BUSINESS_NAME2][playerid], business[i][BUSINESS_COST2][playerid]);

NOTE: You have to understand, the more cells in the array, the more it will weigh when compiling!
Reply


Messages In This Thread
Size gets big +rep - by iBots - 28.08.2015, 12:31
Re: Size gets big +rep - by Isolated - 28.08.2015, 12:34
Re: Size gets big +rep - by iBots - 28.08.2015, 13:40
Re: Size gets big +rep - by Logofero - 28.08.2015, 15:45
Re: Size gets big +rep - by iBots - 28.08.2015, 18:16
Re: Size gets big +rep - by iBots - 28.08.2015, 18:18
Re: Size gets big +rep - by Sew_Sumi - 28.08.2015, 18:51
Re: Size gets big +rep - by Logofero - 28.08.2015, 19:11
Re: Size gets big +rep - by Rodri99 - 28.08.2015, 19:51
Re: Size gets big +rep - by iBots - 28.08.2015, 20:31

Forum Jump:


Users browsing this thread: 1 Guest(s)