Undefined symbol
#3

Quote:
Originally Posted by RanSEE
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/command here", cmdtext, true, 10) == 0)
    {
For those undefined cmd & string
The '10' would be an inappropriate string length in this matter.
Alternatively you can use:
if(strcmp(cmdtext, "/mycommand", true) == 0)
{
new string[145]; //You can replace 145 with the string size appropriate to your situation.
[/pawn]
The max string size for your text, including the null terminator, is approximately 108 cells. So remember to tell the player, or reject their request if their params are longer.

Example:
pawn Код:
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GREEN, "{33CCFF}USAGE:{FFFFFF} /n [text]");
if(strlen(result) > 108) return SendClientMessage(playerid, COLOR_GREEN, "Your Message Must Be Less Than 108 Characters Long.");
Reply


Messages In This Thread
Undefined symbol - by Shannkz - 21.08.2012, 11:33
Re: Undefined symbol - by RanSEE - 21.08.2012, 11:41
Re: Undefined symbol - by clarencecuzz - 21.08.2012, 11:48
Re: Undefined symbol - by Shannkz - 21.08.2012, 12:37
Re: Undefined symbol - by clarencecuzz - 21.08.2012, 12:47
Re: Undefined symbol - by Shannkz - 21.08.2012, 13:11

Forum Jump:


Users browsing this thread: 1 Guest(s)