Mismatch error +rep if helped
#1

Код:
new PlayerText:Speedo[MAX_PLAYERS];
Quote:

C:\Users\Callum.Acer\Desktop\Servers\XenRP\gamemod es\LARP1.pwn(3380) : error 035: argument type mismatch (argument 2)
C:\Users\Callum.Acer\Desktop\Servers\XenRP\gamemod es\LARP1.pwn(3386) : error 035: argument type mismatch (argument 2)

For:

Код:
ShowSpeed(playerid)
{
    PlayerTextDrawShow(playerid, Speedo);
    PlayerTextDrawSetString(playerid,SpeedoText0,"Vehicle: %s~n~Speed: %i KPH");LINE 3380
}

stock HideSpeed(playerid)
{
	PlayerTextDrawHide(playerid, Speedo);LINE 3386
}
Reply
#2

Quote:
Originally Posted by MrCallum
Посмотреть сообщение
Код:
new PlayerText:Speedo[MAX_PLAYERS];

For:

Код:
ShowSpeed(playerid)
{
    PlayerTextDrawShow(playerid, Speedo);
    PlayerTextDrawSetString(playerid,SpeedoText0,"Vehicle: %s~n~Speed: %i KPH");LINE 3380
}

stock HideSpeed(playerid)
{
	PlayerTextDrawHide(playerid, Speedo);LINE 3386
}
Try:

Код:
ShowSpeed(playerid)
{
    PlayerTextDrawShow(playerid, Speedo[playerid]);
    PlayerTextDrawSetString(playerid, Speedo[playerid],"Vehicle: %s~n~Speed: %i KPH");
}

stock HideSpeed(playerid)
{
	PlayerTextDrawHide(playerid, Speedo[playerid]);
}
Reply
#3

PHP код:
PlayerTextDrawSetString(playeridSpeedoText0,"Vehicle: %s~n~Speed: %i KPH"); 
This will display an incorrect text, you must make format above, the text you entered there must already be formatted.

PHP код:
ShowSpeed(playerid)
{
    new 
string[45];
    
PlayerTextDrawShow(playeridSpeedo[playerid]);
    
format(stringsizeof(string), "Vehicle: %s~n~Speed: %i KPH", {Float,_}..);
    
PlayerTextDrawSetString(playeridspeedoText0[playerid], string);

And add "[playerid]" and check that the variables have the correct tag.

PHP код:
new Text:var[MAX_PLAYERS]; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)