Error(creating gamemode).
#1

Код:
stock LoadOrgCash()
{
	new part3[250];
	new part2[40];
	if (!dini_Exists(SAVE_CASH_TO))
	{
		for (new i=1;i<OrgsCount+1;i++)
		{
		dini_Create(SAVE_CASH_TO);
		format(part3,sizeof(part3),"%d");
		Organization[i][cash] = part3;
		SaveOrgCash();
		}
	}

	for (new i=1;i<OrgsCount+1;i++)
	{
	format(part2,sizeof(part2),"%d", i);
	format(part3,sizeof(part3),dini_Get(SAVE_CASH_TO,part2));

	if (strcmp(part3," ", false) == 0)
	{
	part3 = "%d";
	}

    Organization[i][cash] = part3;
	}

	return 1;
	}
ERROR is in this line: Organization[i][cash] = part3;
Error: "Must be assigned to an array".
Reply
#2

You have forgotten i
Код:
for (new i=1;i<OrgsCount+1;i++)
		{
		dini_Create(SAVE_CASH_TO);
		format(part3,sizeof(part3),"%d",i);
		Organization[i][cash] = part3;
		SaveOrgCash();
		}
Reply
#3

In both these lines "Organization[i][cash] = part3;" there is same error
of
Must be assigned to an array.
Reply
#4

Answer please. being late..
Reply
#5

try :
PHP код:
enum porg {
      
cash,

};
new 
Organization[MAX_PLAYERS][porg]; 
Reply
#6

its already added.
Reply
#7

Replace
PHP код:
Organization[i][cash] = part3
WITH
PHP код:
memcpy(Organization[i][cash], cash30MAX_PLAYER_NAME*4MAX_PLAYER_NAME*4); 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)