SendClientMessage broken/bugged
#1

Okay, so I wrote a string thingy for "/my" the idea is to work like /set, /my [value] [Usage]

then it sets the Player[playerid][Description] as the value.

and everything seems fine except for some strange error.

Код:
C:\Users\Connor\Desktop\Vortex1\gamemodes\VortexRoleplay.pwn(21122) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
here's the entire script:

pawn Код:
command(my, playerid, params[])
{
    new Usage[128], Value, string[128];
    if(sscanf(params, "dz", Value, Usage))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /my [value] [usage]"); //this is the broken line
        SendClientMessage(playerid, WHITE, "Usages: Description");
    }
    else
    {
        if(strlen(Usage) >= 1)
        {
            if(strcmp(Usage, "description", true) == 0)
            {
                format(string, sizeof(string), "You have set your description to %d", Value)
                SendClientMessage(playerid, WHITE, string);
                Player[playerid][Description] = Value;
            }
        }
        else
        {
            return 1;
        }
    }
    return 1;
}
Reply
#2

You're missing a semi-colon (;) on the format() line.
Reply
#3

pawn Код:
format(string, sizeof(string), "You have set your description to %d", Value)
You have a ';' missing at the end of the line.
Reply
#4

Quote:
Originally Posted by MP2
Посмотреть сообщение
You're missing a semi-colon ( on the format() line.
I can't believe I missed that.

Thanks!
Reply
#5

Anyone can miss such a simple mistake, nothing to be ashamed about
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)