Invalid Command Length (Exceeding 50 characters)
#1

How can i remove, or atleast boost this up? it's so irritating!!

this is my code:

pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
                return 1;
            }
            if((noooc) && PlayerInfo[playerid][pAdmin] < 3)
            {
                SendClientMessage(playerid, COLOR_GREY, "   The OOC channel has been disabled by an Admin !");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[160];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/o)oc [ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "(( %s: %s ))", sendername, result);
            OOCOff(COLOR_OOC,string);
        }
        return 1;
    }
Reply
#2

Wait, you did

/thisisacommandthathas50charactersorevenmore

and worry about it?
Reply
#3

Hey smart ass, i have a command, like many other roleplay servers;

/o [text] ..

And when i type it's fucking annoying as it's so small.
Reply
#4

Quote:
Originally Posted by NewYorkRP
Посмотреть сообщение
Hey smart ass, i have a command, like many other roleplay servers;

/o [text] ..

And when i type it's fucking annoying as it's so small.
He wasn't being a smart-ass, he was re-inacting what you may be talking about.
Reply
#5

i still need help ffs
Reply
#6

Quote:
Originally Posted by NewYorkRP
Посмотреть сообщение
i still need help ffs
With that attitude no one will help you.

I never had or have this problem with a command, please copy and paste the command.
Reply
#7

it's the new 0.3c which messed it up -.-
Reply
#8

Quote:
Originally Posted by NewYorkRP
Посмотреть сообщение
it's the new 0.3c which messed it up -.-
if its an /o OOC chat command, use command parameters.
Reply
#9

If you're using strtok make sure the result length is increased.
Reply
#10

This is my command:

pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
                return 1;
            }
            if((noooc) && PlayerInfo[playerid][pAdmin] < 3)
            {
                SendClientMessage(playerid, COLOR_GREY, "   The OOC channel has been disabled by an Admin !");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[160];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/o)oc [ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "(( %s: %s ))", sendername, result);
            OOCOff(COLOR_OOC,string);
        }
        return 1;
    }
When i type /o [message], it pops up after half way, saying that i exceeded 50 characters .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)