SA-MP Forums Archive
how to correct these warnings? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how to correct these warnings? (/showthread.php?tid=642058)



how to correct these warnings? - MonsterGamer - 24.09.2017

Код:
C:\Users\test.pwn(104) : warning 213: tag mismatch
C:\Users\test.pwn(105) : warning 213: tag mismatch
C:\Users\test.pwn(106) : warning 213: tag mismatch
C:\Users\test.pwn(107) : warning 213: tag mismatch
C:\Users\test.pwn(108) : warning 213: tag mismatch
C:\Users\test.pwn(109) : warning 213: tag mismatch
C:\Users\test.pwn(110) : warning 213: tag mismatch
C:\Users\test.pwn(110) : warning 202: number of arguments does not match definition
Код:
	new count = db_num_rows(resultado), TempString[56], time = GetTickCount(), i;
	for(new z = 0; z < count; z++)
	{
		i = Iter_Free(GangZones);

		GangZone[i][ZoneMinPos][0] = db_get_field_assoc_float(z, "minx"); //line 104
		GangZone[i][ZoneMinPos][1] = db_get_field_assoc_float(z, "miny"); //105
		GangZone[i][ZoneMaxPos][0] = db_get_field_assoc_float(z, "maxx"); //106
		GangZone[i][ZoneMaxPos][1] = db_get_field_assoc_float(z, "maxy"); //107
		GangZone[i][ZoneOwner]	= GetGangID(db_get_field_assoc_int(z, "owner")); //108
		GangZone[i][ZoneID]	= db_get_field_assoc_int(z, "id"); //109
		db_get_field_assoc(z, "name",TempString); //110
		format(GangZone[i][ZoneName], 50, "%s", TempString);
		GangZone[i][ZoneArea] = Area_AddBox(GangZone[i][ZoneMinPos][0], GangZone[i][ZoneMinPos][1], GangZone[i][ZoneMaxPos][0], GangZone[i][ZoneMaxPos][1]);
		GangZone[i][ZoneHolder] = GangZoneCreate(GangZone[i][ZoneMinPos][0], GangZone[i][ZoneMinPos][1], GangZone[i][ZoneMaxPos][0], GangZone[i][ZoneMaxPos][1]);
		GangZone[i][ZoneLocked] = 0;
		GangZone[i][ZoneStatus] = false;
		Iter_Add(GangZones, i);
	}
I am using the gang system for x337, but I try to use it as sqlite.


Re: how to correct these warnings? - MonsterGamer - 24.09.2017

someone?


Re: how to correct these warnings? - raydx - 24.09.2017

Show your GangZone enum.


Re: how to correct these warnings? - Xeon™ - 24.09.2017

PHP код:
db_get_field_assoc(z"name",TempString); 
to
PHP код:
db_get_field_assoc(z"name",TempStringsizeof(TempString)); 



Re: how to correct these warnings? - Zeth - 24.09.2017

When you have defined GangZone[i][ZoneMinPos, did u declared them as float?


Re: how to correct these warnings? - VVWVV - 24.09.2017

`z` must be declared with `DBResult` tag.

pawn Код:
native db_get_field_assoc_float(DBResult:dbresult, const field[]);



Re: how to correct these warnings? - Xeon™ - 24.09.2017

Quote:
Originally Posted by VVWVV
Посмотреть сообщение
`z` must be declared with `DBResult` tag.

pawn Код:
native db_get_field_assoc_float(DBResult:dbresult, const field[]);
oh! didn't see that this a god damn sqlite :/


Re: how to correct these warnings? - MonsterGamer - 24.09.2017

Thanks for answering, here is the enum.

Код:
enum _gangzone
{
	ZoneID,
	Float:ZoneMinPos[2], //already defined as float
	Float:ZoneMaxPos[2], //.....
	ZoneOwner,
	ZoneName[50],
	ZoneHolder,
	ZoneArea,
	ZoneLocked,
	bool:ZoneStatus,
	ZoneTimer
}