OMG! HELP! SIMPLE ERROR!
#1

Код:
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1040 -- 1041) : error 001: expected token: ",", but found "["
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1041) : warning 217: loose indentation
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1041) : error 029: invalid expression, assumed zero
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1041) : error 017: undefined symbol "twName"
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1041) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
stock SaveTurfWars() {
	print("Saving Turfs.");
	if(!fexist("turfwars.cfg"))
		return 1;

	new
		szFileStr[1024],
		File: fHandle = fopen("turfwars.cfg", io_write);

	for(new iIndex; iIndex < MAX_TURFS; ++iIndex) {
1040		format(szFileStr, sizeof(szFileStr), "%s|%d|%d|%d|%d|%f|%f|%f|%f\r\n",
1041			TurfWars[iIndex][twName],
			TurfWars[iIndex][twOwnerId],
			TurfWars[iIndex][twLocked],
			TurfWars[iIndex][twSpecial],
			TurfWars[iIndex][twVulnerable],
			TurfWars[iIndex][twMinX],
			TurfWars[iIndex][twMinY],
			TurfWars[iIndex][twMaxX],
			TurfWars[iIndex][twMaxY]
		);
		fwrite(fHandle, szFileStr);
	}
	return fclose(fHandle);
}
Reply
#2

Try this
Код:
stock SaveTurfWars() 
{
	print("Saving Turfs.");
	if(!fexist("turfwars.cfg"))
	return 1;

	new
		szFileStr[1024],
		File: fHandle = fopen("turfwars.cfg", io_write);

	for(new iIndex; iIndex < MAX_TURFS; ++iIndex) 
	{
		1040	format(szFileStr, sizeof(szFileStr), "%s|%d|%d|%d|%d|%f|%f|%f|%f\r\n",
		1041	TurfWars[iIndex][twName],
			TurfWars[iIndex][twOwnerId],
			TurfWars[iIndex][twLocked],
			TurfWars[iIndex][twSpecial],
			TurfWars[iIndex][twVulnerable],
			TurfWars[iIndex][twMinX],
			TurfWars[iIndex][twMinY],
			TurfWars[iIndex][twMaxX],
			TurfWars[iIndex][twMaxY]
		);
		fwrite(fHandle, szFileStr);
	}
	return fclose(fHandle);
}
Reply
#3

Quote:
Originally Posted by Brentbad04
Посмотреть сообщение
Try this
Код:
stock SaveTurfWars() 
{
	print("Saving Turfs.");
	if(!fexist("turfwars.cfg"))
	return 1;

	new
		szFileStr[1024],
		File: fHandle = fopen("turfwars.cfg", io_write);

	for(new iIndex; iIndex < MAX_TURFS; ++iIndex) 
	{
		1040	format(szFileStr, sizeof(szFileStr), "%s|%d|%d|%d|%d|%f|%f|%f|%f\r\n",
		1041	TurfWars[iIndex][twName],
			TurfWars[iIndex][twOwnerId],
			TurfWars[iIndex][twLocked],
			TurfWars[iIndex][twSpecial],
			TurfWars[iIndex][twVulnerable],
			TurfWars[iIndex][twMinX],
			TurfWars[iIndex][twMinY],
			TurfWars[iIndex][twMaxX],
			TurfWars[iIndex][twMaxY]
		);
		fwrite(fHandle, szFileStr);
	}
	return fclose(fHandle);
}
Код:
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1042 -- 1043) : error 001: expected token: ",", but found "["
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1043) : error 029: invalid expression, assumed zero
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1043) : error 017: undefined symbol "twName"
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pwn(1043) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
stock SaveTurfWars()
{
	print("Saving Turfs.");
	if(!fexist("turfwars.cfg"))
	return 1;

	new
		szFileStr[1024],
		File: fHandle = fopen("turfwars.cfg", io_write);

	for(new iIndex; iIndex < MAX_TURFS; ++iIndex)
	{
1042			format(szFileStr, sizeof(szFileStr), "%s|%d|%d|%d|%d|%f|%f|%f|%f\r\n",
1043			TurfWars[iIndex][twName],
			TurfWars[iIndex][twOwnerId],
			TurfWars[iIndex][twLocked],
			TurfWars[iIndex][twSpecial],
			TurfWars[iIndex][twVulnerable],
			TurfWars[iIndex][twMinX],
			TurfWars[iIndex][twMinY],
			TurfWars[iIndex][twMaxX],
			TurfWars[iIndex][twMaxY]
		);
		fwrite(fHandle, szFileStr);
	}
	return fclose(fHandle);
}
Reply
#4

show TurfWars array
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)