Quote:
Originally Posted by DTV
I've ran into a problem where I can't specify the player textdraw I want to update with a formatted string.
pawn Код:
public AssignInventoryNameValues(playerid) { for(new i=0; i<MAX_INVSLOTS; i++) { new txt[32],string[128]; switch(IsStackableItemInPlayerSlot(playerid,i)) { case 0: format(string,sizeof(string),"%i. %s",i+1,GetItemName(playerid,i)); case 1: format(string,sizeof(string),"%i. %s (%i)",i+1,GetItemName(playerid,i),Player[playerid][pInventoryAmount][i]); } format(txt,sizeof(txt),"InvSlot%i[playerid]",i+1); PlayerTextDrawSetString(playerid,txt,string); //this is the error line } return 1; }
When I compile all I get for the error is:
pawn Код:
error 035: argument type mismatch (argument 2)
|
It's because PlayerTextDrawSetString must have 3 parameters. playerid, textname, textdrawstring.
Is the second parameter a textdraw variable?