What the problem ?
#1

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;
}
Reply
#2

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.
Reply
#3

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)
Reply
#4

Quote:

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

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

EDIT : Ops sorry Konstantinos
Reply
#5

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)