SA-MP Forums Archive
What the problem ? - 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: What the problem ? (/showthread.php?tid=483316)



What the problem ? - FailerZ - 25.12.2013

Shows that error

Код HTML:
Server\filterscripts\ILC.pwn(87) : error 035: argument type mismatch (argument 2)
Lines From 78 To 91
pawn Код:
public OnPlayerDoneCreating(playerid)
{
    IsPickingPos[playerid] = 0;
    IsCreating[playerid] = 0;

    new text[256], color[50];
    GetPVarString(playerid, "String", text, sizeof(text));
    GetPVarString(playerid, "Color", color, sizeof(color));
    //Line 87 (Error line)
    Create3DTextLabel(text, color, GetPVarFloat(playerid, "PosX"), GetPVarFloat(playerid, "PosY"), GetPVarFloat(playerid, "PosZ"), 40, 0, 0); //(Error line)

    ResetLabelPVars(playerid);
    return 1;
}



Re: What the problem ? - Konstantinos - 25.12.2013

color must be an integer and not an array like the above code. So you'll need to convert the "Color" string to an integer.


Re: What the problem ? - FailerZ - 25.12.2013

pawn Код:
if(HexToInt(inputtext))
                    {
                        SetPVarInt(playerid, "Color", inputtext);
                       
                        CallLocalFunction("OnPlayerDoneCreating", "i", playerid);
                    }
Shows this error now

Код HTML:
Server\filterscripts\ILC.pwn(145) : error 035: argument type mismatch (argument 3)



Re: What the problem ? - SilentSoul - 25.12.2013

Quote:

Note: Use color embedding for multiple colors in the text.

https://sampwiki.blast.hk/wiki/Create3DTextLabel

EDIT : Ops sorry Konstantinos


Re: What the problem ? - Konstantinos - 25.12.2013

Maybe something like that:
pawn Код:
Create3DTextLabel(text, HexToInt(color), GetPVarFloat(playerid, "PosX"), GetPVarFloat(playerid, "PosY"), GetPVarFloat(playerid, "PosZ"), 40, 0, 0);



Re: What the problem ? - FailerZ - 25.12.2013

Thanks
Works...
pawn Код:
public OnPlayerDoneCreating(playerid)
{
    IsPickingPos[playerid] = 0;
    IsCreating[playerid] = 0;

    new text[256], color[50];
    GetPVarString(playerid, "String", text, sizeof(text));
    GetPVarString(playerid, "Color", color, sizeof(color));

    Create3DTextLabel(text, HexToInt(color), GetPVarFloat(playerid, "PosX"), GetPVarFloat(playerid, "PosY"), GetPVarFloat(playerid, "PosZ"), 40, 0, 0);

    ResetLabelPVars(playerid);
    return 1;
}
Код HTML:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
I remade the color to SetPVarString thanks anyway