Tag mismatch some please qucikly help.
#1

pawn Код:
GetPlayerWeaponData(playerid,2, GetPVarInt(playerid, "Gun1"), GetPVarInt (playerid, "Ammo1"));
GetPlayerWeaponData(playerid,3, GetPVarInt(playerid, "Gun2"), GetPVarInt(playerid, "Ammo2"));
GetPlayerWeaponData(playerid,4, GetPVarInt(playerid, "Gun3"), GetPVarInt(playerid, "Ammo3"));
GetPlayerWeaponData(playerid,5, GetPVarInt(playerid, "Gun4"), GetPVarInt(playerid, "Ammo4"));
GetPlayerWeaponData(playerid,6, GetPVarInt(playerid, "Gun5"), GetPVarInt(playerid, "Ammo5"));
GetPlayerWeaponData(playerid,7, GetPVarInt(playerid, "Gun6"), GetPVarInt(playerid, "Ammo6"));
I get these errors when i do that

Код:
C:\Documents and Settings\Cem's\My Documents\Gta\gamemodes\blank.pwn(5129) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Cem's\My Documents\Gta\gamemodes\blank.pwn(5130) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Cem's\My Documents\Gta\gamemodes\blank.pwn(5131) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Cem's\My Documents\Gta\gamemodes\blank.pwn(5132) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Cem's\My Documents\Gta\gamemodes\blank.pwn(5133) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Cem's\My Documents\Gta\gamemodes\blank.pwn(5134) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Can anyone help me please?
Reply
#2

you're trying to put data into a GetPVarInt, put it into another variable and then into SetPVarInt
Reply
#3

Код:
new msg[32];
for(new i = 0;i<13;i++)
{
	new weapon,ammo;
	format(msg,sizeof msg,"gun_%i",i);
	GetPlayerWeaponData(playerid,i,weapon,ammo);
	SetPVarInt(playerid,msg,weapon);
	format(msg,sizeof msg,"ammo_%i",i);
	SetPVarInt(playerid,msg,ammo);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)