SA-MP Forums Archive
argument type mismatch (argument 1) - 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: argument type mismatch (argument 1) (/showthread.php?tid=403999)



argument type mismatch (argument 1) - nLs - 01.01.2013

The error :

Код:
C:\Users\Derek\Downloads\****.pwn(23662) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
The Code:

Код:
CMD:vshow(playerid)
{
    if (PlayerInfo[playerid][pDonateRank] < 1)
	{
		return 1;
	}
    if(PlayerInfo[playerid][pDonateRank] >= 1)
	{
	    new string[128];
		if(DonaterDuty[playerid] == 0)
		{
			if(PlayerInfo[playerid][pDonateRank] == 1)
			{
				DonaterDuty[playerid] = 1;
				SetPlayerColor(playerid, COLOR_YELLOW);
	    		        DLabel[playerid] = CreateDynamic3DTextLabel("Donator", COLOR_YELLOW, 30.0, 40.0, 50.0, 50.0, playerid);
    			        Attach3DTextLabelToPlayer(DLabel, playerid, 0.0, 0.0, 0.7);
				return 1;
			}
		}
		else
		{
			if(PlayerInfo[playerid][pDonateRank] == 1)
			{
				DonaterDuty[playerid] = 0;
				DestroyDynamic3DTextLabel(DLabel[playerid]);
				if(PlayerInfo[playerid][pDonateRank])
			 	{
			 	    SetPlayerColor(playerid, COLOR_WHITE);
			 	}
			 	else
			 	{
			 	    SetPlayerColor(playerid, COLOR_WHITE);
			 	}
				return 1;
			}
		}
	}
	return 1;
}
The line with the error:

Код:
Attach3DTextLabelToPlayer(DLabel, playerid, 0.0, 0.0, 0.7);



Re: argument type mismatch (argument 1) - -=Dar[K]Lord=- - 01.01.2013

pawn Код:
Attach3DTextLabelToPlayer(DLabel[playerid], playerid, 0.0, 0.0, 0.7);
replace now try it


Re: argument type mismatch (argument 1) - nLs - 01.01.2013

It worked! Thanks so much for the fast reply.