Points Config Loading Error.
#1

What's up?

Right, we put this Point system into our script the problem is, that the .cfg isn't right. We've tried to make our own, but honestly as dumb as it sounds; I've got no idea.
Anyway; We get no error in the actually script, it's like in-game it should say "The Materials Factory #1 is now available to capture" But it doesn't, it doesn't say the name of the capture point.

Here is the LoadPoints();
Код:
public LoadPoints()
{
	new arrCoords[8][64];
	new strFromFile2[256];
	new File: file = fopen("points.cfg", io_read);
	if (file)
	{
		new idx;
		while (idx < sizeof(Points))
		{
			fread(file, strFromFile2);
			split(strFromFile2, arrCoords, '|');
			Points[idx][Pointx] = floatstr(arrCoords[0]);
			Points[idx][Pointy] = floatstr(arrCoords[1]);
			Points[idx][Pointz] = floatstr(arrCoords[2]);
			Points[idx][Type] = strval(arrCoords[3]);
			Points[idx][Vulnerable] = strval(arrCoords[4]);
			strmid(Points[idx][Owner], arrCoords[5], 0, strlen(arrCoords[5]), 255);
			strmid(Points[idx][Name], arrCoords[6], 0, strlen(arrCoords[6]), 255);
			Points[idx][MatPoint] = strval(arrCoords[7]);
			printf("%s | Type:%d Owner:%s",Points[idx][Name],Points[idx][Type],Points[idx][Owner]);
			idx++;
		}
		fclose(file);
	}
	return 1;
}
Basically I need a configuration file based on that, but I have no idea on how to-do it.
Reply


Messages In This Thread
Points Config Loading Error. - by MrScott - 27.01.2011, 19:14
Re: Points Config Loading Error. - by MrScott - 29.01.2011, 21:21
Re: Points Config Loading Error. - by iMonk3y - 29.01.2011, 21:38
Re: Points Config Loading Error. - by MrScott - 30.01.2011, 01:36

Forum Jump:


Users browsing this thread: 1 Guest(s)