error comando /intentar
#1

Me sale estos errores con el siguiente comando! Ayuda!


Код:
C:\Users\Valen\Desktop\GMS\Latin RolePlay\gamemodes\ZenonCity.net.pwn(22042) : error 017: undefined symbol "sendername"
C:\Users\Valen\Desktop\GMS\Latin RolePlay\gamemodes\ZenonCity.net.pwn(22042) : error 017: undefined symbol "sendername"
C:\Users\Valen\Desktop\GMS\Latin RolePlay\gamemodes\ZenonCity.net.pwn(22042) : error 029: invalid expression, assumed zero
C:\Users\Valen\Desktop\GMS\Latin RolePlay\gamemodes\ZenonCity.net.pwn(22042) : fatal error 107: too many error messages on one line
pawn Код:
zcmd(intentar, playerid, params[])
    {
          if(IsPlayerConnected(playerid))//esto verifica el name del user.
          {
            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, "Utiliza: /Intentar [Acciуn]");//al poner /intentar sale ese mensaje.
                return 1;
            }
                new rand = random(2);
                if(rand == 0)
                {
                    if(PlayerInfo[playerid][pMaskuse] == 0)
                    {
                        format(string, sizeof(string), "* %s Intento %s y consiguio hacerlo", sendername, result);//esto lo quieres que diga.
                        ProxDetector(30.0,playerid, string, COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);//el color del intentar
                    }
                    else
                    {
                        format(string, sizeof(string), "* Desconocido Intento %s y consiguio hacerlo", result);//lo mismo de arriva ^^
                        ProxDetector(30.0,playerid, string, COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
                    }
                }
                else if(rand == 1)
                {
                    if(PlayerInfo[playerid][pMaskuse] == 0)
                    {
                        format(string, sizeof(string), "* %s Intento %s y no consiguio hacerlo", sendername, result);//Lo mismo de arriba^^
                        ProxDetector(30.0,playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
                    }
                    else
                    {
                        format(string, sizeof(string), "* Desconocido Intento %s y no consiguio hacerlo", result);
                        ProxDetector(30.0,playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
                    }
                }
            }
      }
      if(NoIntentar[playerid] < MAXIMOS_INTENTAR) NoIntentar[playerid]++;
      if(NoIntentar[playerid] == MAXIMOS_INTENTAR)
      {
          SetTimerEx("VolverUsarIntentar",6000,0,"d",playerid);
      }
      return 1;
 }
Reply
#2

Te falto un new encima de la funciуn GetPlayerName

Код:
new sendername[MAX_PLAYER_NAME];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)