SA-MP Forums Archive
Argument type mismatch - 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 (/showthread.php?tid=525565)



Argument type mismatch - Dusan01 - 12.07.2014

Hi guys this is my problem:

Код:
stock ZonaBoja2(orga)
{
    new boja[64];
	switch(orga)
	{
	case 5	: { format(boja, sizeof(boja), "0x00000066"); }
	case 6	: { format(boja, sizeof(boja), "0xFF000066"); }
	case 11	: { format(boja, sizeof(boja), "0x00AE0066"); }
	case 16	: { format(boja, sizeof(boja), "0xFFFF0066"); }
	case 12	: { format(boja, sizeof(boja), "0xB906B966"); }
	case 13	: { format(boja, sizeof(boja), "0xC0C0C066"); }
	case 17	: { format(boja, sizeof(boja), "0x80400066"); }
	case 14	: { format(boja, sizeof(boja), "0x0080FF66"); }
	case 18	: { format(boja, sizeof(boja), "0x80FFFF66"); }
	case 19	: { format(boja, sizeof(boja), "0x00FF8066"); }
	case 20	: { format(boja, sizeof(boja), "0x9D000066"); }
	case 21	: { format(boja, sizeof(boja), "0xFF008066"); }
	case 22	: { format(boja, sizeof(boja), "0xFF800066"); }
	}
return boja;
}
and this is where is error:
Код:
GangZoneFlashForAll(ZonaID[id], ZonaBoja2(PI[playerid][Clan]));
error:
Код:
error 035: argument type mismatch (argument 2)



Re: Argument type mismatch - Konstantinos - 12.07.2014

I assume it excepts the colour which is an integer and not a string. If that's the case:
pawn Код:
stock ZonaBoja2(orga)
{
    new boja;
    switch(orga)
    {
        case 5: boja = 0x00000066;
        case 6: boja = 0xFF000066;
        case 11: boja = 0x00AE0066;
        case 16: boja = 0xFFFF0066;
        case 12: boja = 0xB906B966;
        case 13: boja = 0xC0C0C066;
        case 17: boja = 0x80400066;
        case 14: boja = 0x0080FF66;
        case 18: boja = 0x80FFFF66;
        case 19: boja = 0x00FF8066;
        case 20: boja = 0x9D000066;
        case 21: boja = 0xFF008066;
        case 22: boja = 0xFF800066;
    }
    return boja;
}



Re: Argument type mismatch - Dusan01 - 12.07.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I assume it excepts the colour which is an integer and not a string. If that's the case:
pawn Код:
stock ZonaBoja2(orga)
{
    new boja;
    switch(orga)
    {
        case 5: boja = 0x00000066;
        case 6: boja = 0xFF000066;
        case 11: boja = 0x00AE0066;
        case 16: boja = 0xFFFF0066;
        case 12: boja = 0xB906B966;
        case 13: boja = 0xC0C0C066;
        case 17: boja = 0x80400066;
        case 14: boja = 0x0080FF66;
        case 18: boja = 0x80FFFF66;
        case 19: boja = 0x00FF8066;
        case 20: boja = 0x9D000066;
        case 21: boja = 0xFF008066;
        case 22: boja = 0xFF800066;
    }
    return boja;
}
Thanks bro now work rep+