HELP with /b
#1

So i made a /b command for my roleplay but i get 3 errors
pawn Код:
undefined symbol "sendername"
Here is the code:
pawn Код:
if(strcmp(cmdtext, "/b", true) == 0)
    {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /b [local ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "%s Says: (( %s ))", sendername, result);
            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            printf("%s", string);
        }
Reply


Messages In This Thread
HELP with /b - by Matej_ - 31.01.2011, 13:48
Re: HELP with /b - by bartje01 - 31.01.2011, 13:49
Re: HELP with /b - by [03]Garsino - 31.01.2011, 13:53
Re: HELP with /b - by Matej_ - 31.01.2011, 13:54
Re: HELP with /b - by bartje01 - 31.01.2011, 14:09
Re: HELP with /b - by [03]Garsino - 31.01.2011, 14:19
Re: HELP with /b - by Audiophr3ak - 31.01.2011, 14:23
Re: HELP with /b - by Matej_ - 31.01.2011, 14:27
Re: HELP with /b - by [03]Garsino - 31.01.2011, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)