09.09.2011, 12:14
Okay since the above poster didn't explain the problem...(and didn't fix the other problems)
The problem is that you're trying to use an array in format called "string", but that array does not exist, so you need to make one. There's also no need to create another variable just to get a value from another variable, additionally you're using %s for strings and I assume this is an integer so you need to use %i.
Here's an example:
That's all you need, although why not juse have the "Amount of Materials: %d" in the format, instead of having them as separate messages on separate lines
The problem is that you're trying to use an array in format called "string", but that array does not exist, so you need to make one. There's also no need to create another variable just to get a value from another variable, additionally you're using %s for strings and I assume this is an integer so you need to use %i.
Here's an example:
pawn Код:
if(strcmp(cmd, "/mats", true) == 0)
{
new string[8];
SendClientMessage(playerid, COLOR_WHITE, "Amount of Materials....");
format(string,sizeof(string),"%d", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
