undeffined symbol "idx"
#3

This is horrible code.
1. you are comparing the first 9 characters of a string that is 14 characters long
2. you have defined a string 256 characters long to hold a string that you don't even use
3. the string you are displaying the result in is only 128 characters long, and you don't even need it anyway
4. if you are using strtok, idx should already be defined under OnPlayerCommandText
5. idx should already have a value from when you used strtok to get the /advertissment command

pawn Код:
public OnPlayerCOmmandText(playerid,cmdtext[])
{
     new tmp[128],idx;
     tmp = strtok(cmdtext, idx);
     if(!strcmp(tmp,"/advertissment",true))
     {
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp))
          {
                //message
           }
           AdvertissmentForward(tmp);
     }
     return 0;
}
Reply


Messages In This Thread
undeffined symbol "idx" - by Hamza' - 06.10.2010, 16:01
Re: undeffined symbol "idx" - by Jeffry - 06.10.2010, 16:04
Re: undeffined symbol "idx" - by Rachael - 06.10.2010, 16:13

Forum Jump:


Users browsing this thread: 1 Guest(s)