Why does it save like this?
#1

Alright, so... I'll start by showing you this:

As you can see, the Organization has been created as ID 1, but the file created is called 49. It then counts up from there, as it should. I'm using the variable 'orgId[oId] to set both at practically the same time though?

Below you will find the only other instance of 'orgId[oId]' in the script:

Код:
public LoadOrganizationData2(name[], value[])
{
	new orgname;
	INI_Int("OrgID", orgId[oId]);
Incase it's needed, here is the rest of the code in the 'createorg' command below what is in the screenshot:

Код:
	switch(orgId[oId]
	{
	    case 1:
		{
			INI_WriteString(OrgFile1, "Org1Name", string);
		}
		case 2:
		{
			INI_WriteString(OrgFile1, "Org2Name", string);
		}
		case 3:
		{
			INI_WriteString(OrgFile1, "Org3Name", string);
		}
		case 4:
		{
			INI_WriteString(OrgFile1, "Org4Name", string);
		}
		case 5:
		{
			INI_WriteString(OrgFile1, "Org5Name", string);
		}
		case 6:
		{
			INI_WriteString(OrgFile1, "Org6Name", string);
		}
		case 7:
		{
			INI_WriteString(OrgFile1, "Org7Name", string);
		}
		case 8:
		{
			INI_WriteString(OrgFile1, "Org8Name", string);
		}
		case 9:
		{
			INI_WriteString(OrgFile1, "Org9Name", string);
		}
		case 10:
		{
			INI_WriteString(OrgFile1, "Org10Name", string);
		}
	INI_Close(OrgFile1);
	
	INI_ParseFile(oFile, "LoadOrganizationData");
	
	format(string1, sizeof(string1), "Organization: %s(%d) has been created.", orgname, orgId[oId]);
	SCMToAll(COLOR_GREEN, string1);
	
	format(string1, sizeof(string2), "Organization: %s(%d) has been created by %s.", orgname, orgId[oId], GetName(playerid));
	printf(string1);
Edit: Notice here that ten organizations were created, but only nine files.



(Also ignore the few stupid errors I made in quickly trying to get this ready to post here.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)