idx error.
#1

Hi!

I tried to make an order, only for leaders, but that faction player when connecting the server I want to show "X Faction News: Tomorrow at 14:00 war", I tried to make onplayerlogin, but it gives me error and do not know how to do.

Command:
Код:
if(strcmp(cmd, "/factionanunt", true) == 0 || strcmp(cmd, "/facan", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pRank] < 5)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Trebuie sa ai rankul in factiune mai mare ca 5 !");
                return 1;
            }
            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: (/fac)tionanunt [text]");
                return 1;
            }
            if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
            {
                format(string, sizeof(string), "Anunt Factiune:  %s", result);
                SendClientMessageToAll(COLOR_DBLUE, string);
            }
        }
        return 1;
    }
Error:
Код:
C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(1913 : error 017: undefined symbol "idx"
C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19140) : error 017: undefined symbol "idx"
C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19142) : error 017: undefined symbol "idx"
C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19142) : error 017: undefined symbol "idx"
C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19142) : error 029: invalid expression, assumed zero
C:\Documents and Settings\pwaah\Desktop\vladgm\vladgm\gamemodes\gf. pwn(19142) : fatal error 107: too many error messages on one line
PS: i defined IDX ,but it still gives me errors

Sorry for my bad english. i need help
Reply


Messages In This Thread
idx error. - by Mititel - 06.02.2014, 20:34
Re: idx error. - by Mititel - 07.02.2014, 22:30
Re: idx error. - by xdec0de - 08.02.2014, 01:05
Re: idx error. - by Mititel - 08.02.2014, 15:39
Re: idx error. - by Mititel - 09.02.2014, 12:45
Re: idx error. - by Mititel - 10.02.2014, 08:39
Re: idx error. - by SwisherSweet - 10.02.2014, 08:46
Re: idx error. - by Mititel - 10.02.2014, 21:01
Re: idx error. - by CuervO - 10.02.2014, 21:10
Re: idx error. - by Mititel - 22.02.2014, 23:30

Forum Jump:


Users browsing this thread: 3 Guest(s)