[Ajuda] varios erros ao compilar
#1

oque tem de errando ai :


Код:
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(334) : error 033: array must be indexed (variable "Textdraw2")
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(337) : error 017: undefined symbol "loginname"
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(337) : error 017: undefined symbol "loginname"
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(337) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(337) : fatal error 107: too many error messages on one line


Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
      if(clickedid == Textdraw2)
      {
              new plname[MAX_PLAYER_NAME];
              GetPlayerName(playerid,loginname,sizeof(loginname));
              GetPlayerName(playerid, plname, sizeof(plname));
         format(gstring,sizeof(gstring), "Contas/%s.ini", plname);
              if(DOF2_FileExists(gstring))
              {
                 // SEU SISTEMA DE LOGIN
                        }
                        else
                        {
                              ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк nгo tem uma conta!", "Ok", "");
              }
              return 1;
      }
      if(clickedid == Textdraw4)
               {
         new plname[MAX_PLAYER_NAME];
              GetPlayerName(playerid,loginname,sizeof(loginname));
              GetPlayerName(playerid, plname, sizeof(plname));
         format(gstring,sizeof(gstring), "Contas/%s.ini", plname);
              if(DOF2_FileExists(gstring))
              {
                     ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк tem uma conta, logue-se!", "Ok", "");
              }
              else
              {
                 // SEU SISTEMA DE LOGIN AQUI
                        }
              return 1;
      }
      if(clickedid == Textdraw4)
      {
                SendClientMessage(playerid, 0xFFFFFFAA, "Vocк foi kickado por nгo se registrar/logar!");
                     return Kick(playerid);
      }
      return 1;
   }
        return 1;
}
HELP - ME
Reply
#2

Exclua a linha
PHP код:
GetPlayerName(playerid,loginname,sizeof(loginname)); 
Reply
#3

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Exclua a linha
PHP код:
GetPlayerName(playerid,loginname,sizeof(loginname)); 
cara deu isso


Код:
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(334) : error 033: array must be indexed (variable "Textdraw2")
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : warning 217: loose indentation
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : error 017: undefined symbol "gstring"
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : error 017: undefined symbol "gstring"
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : fatal error 107: too many error messages on one line
Reply
#4

Quote:
Originally Posted by LeonardoAlberto
Посмотреть сообщение
cara deu isso


Код:
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(334) : error 033: array must be indexed (variable "Textdraw2")
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : warning 217: loose indentation
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : error 017: undefined symbol "gstring"
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : error 017: undefined symbol "gstring"
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Desktop\BPS\gamemodes\BPS.pwn(338) : fatal error 107: too many error messages on one line
Crie a string gstring, new gstring[50];

Amigo, vocк precisa ler os prуprios erros antes de sair postando, se vocк tivesse feito isso jб teria arrumado


fatal error 107: too many error messages on one line < Isso aqui й consequкncia de vбrios erros na mesma linha

error 029: invalid expression, assumed zero < Aqui estб dizendo que a expressгo й invalida porque vocк nгo criou gstring.
"Sнmbolo indefinido "gstring"" significa que vocк nгo definiu "gstring"

warning 217: loose indentation < Aqui й problema de indentaзгo

error 033: array must be indexed < Aqui fala que vocк deve aderir um valor а array

Uma rбpida lida no seu cуdigo e vocк consegue identificar todos os erros, й sу ler

https://sampforum.blast.hk/showthread.php?tid=252966 Aqui tem os erros mais comuns.
Reply
#5

Quote:
Originally Posted by Electrifying
Посмотреть сообщение
Crie a string gstring, new gstring[50];

Amigo, vocк precisa ler os prуprios erros antes de sair postando, se vocк tivesse feito isso jб teria arrumado


fatal error 107: too many error messages on one line < Isso aqui й consequкncia de vбrios erros na mesma linha

error 029: invalid expression, assumed zero < Aqui estб dizendo que a expressгo й invalida porque vocк nгo criou gstring.
"Sнmbolo indefinido "gstring"" significa que vocк nгo definiu "gstring"

warning 217: loose indentation < Aqui й problema de indentaзгo

error 033: array must be indexed < Aqui fala que vocк deve aderir um valor а array

Uma rбpida lida no seu cуdigo e vocк consegue identificar todos os erros, й sу ler

https://sampforum.blast.hk/showthread.php?tid=252966 Aqui tem os erros mais comuns.
Код:
C:\Users\Lucas Alves\Desktop\Brasil MegaSamp\gamemodes\BMS.pwn(302) : error 033: array must be indexed (variable "Textdraw2")
C:\Users\Lucas Alves\Desktop\Brasil MegaSamp\gamemodes\BMS.pwn(317) : error 033: array must be indexed (variable "Textdraw4")
C:\Users\Lucas Alves\Desktop\Brasil MegaSamp\gamemodes\BMS.pwn(332) : error 033: array must be indexed (variable "Textdraw4")
deu erro de qualquer jeito

Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)

    if(_:clickedid != INVALID_TEXT_DRAW)
    {
      if(clickedid == Textdraw2)
      {
			  new plname[MAX_PLAYER_NAME];
			  GetPlayerName(playerid, plname, sizeof(plname));
              format(gstring,sizeof(gstring), "Contas/%s.ini", plname);
              if(DOF2_FileExists(gstring))
              {
                 // SEU SISTEMA DE LOGIN
                        }
                        else
                        {
              ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк nгo tem uma conta!", "Ok", "");
              }
              return 1;
      }
      if(clickedid == Textdraw4)
               {
              new plname[MAX_PLAYER_NAME];
			  GetPlayerName(playerid, plname, sizeof(plname));
              format(gstring,sizeof(gstring), "Contas/%s.ini", plname);
              if(DOF2_FileExists(gstring))
              {
                     ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк tem uma conta, logue-se!", "Ok", "");
              }
              else
              {
                 // SEU SISTEMA DE LOGIN AQUI
                        }
              return 1;
      }
      if(clickedid == Textdraw4)
      {
                SendClientMessage(playerid, 0xFFFFFFAA, "Vocк foi kickado por nгo se registrar/logar!");
      Kick(playerid);
      }
      return 1;
   }
        return 1;
}
Reply
#6

Quote:
Originally Posted by LeonardoAlberto
Посмотреть сообщение
Код:
C:\Users\Lucas Alves\Desktop\Brasil MegaSamp\gamemodes\BMS.pwn(302) : error 033: array must be indexed (variable "Textdraw2")
C:\Users\Lucas Alves\Desktop\Brasil MegaSamp\gamemodes\BMS.pwn(317) : error 033: array must be indexed (variable "Textdraw4")
C:\Users\Lucas Alves\Desktop\Brasil MegaSamp\gamemodes\BMS.pwn(332) : error 033: array must be indexed (variable "Textdraw4")
deu erro de qualquer jeito

Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)

    if(_:clickedid != INVALID_TEXT_DRAW)
    {
      if(clickedid == Textdraw2)
      {
			  new plname[MAX_PLAYER_NAME];
			  GetPlayerName(playerid, plname, sizeof(plname));
              format(gstring,sizeof(gstring), "Contas/%s.ini", plname);
              if(DOF2_FileExists(gstring))
              {
                 // SEU SISTEMA DE LOGIN
                        }
                        else
                        {
              ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк nгo tem uma conta!", "Ok", "");
              }
              return 1;
      }
      if(clickedid == Textdraw4)
               {
              new plname[MAX_PLAYER_NAME];
			  GetPlayerName(playerid, plname, sizeof(plname));
              format(gstring,sizeof(gstring), "Contas/%s.ini", plname);
              if(DOF2_FileExists(gstring))
              {
                     ShowPlayerDialog(playerid, 9632, DIALOG_STYLE_MSGBOX, "ERRO", "{FFFFFF}Vocк tem uma conta, logue-se!", "Ok", "");
              }
              else
              {
                 // SEU SISTEMA DE LOGIN AQUI
                        }
              return 1;
      }
      if(clickedid == Textdraw4)
      {
                SendClientMessage(playerid, 0xFFFFFFAA, "Vocк foi kickado por nгo se registrar/logar!");
      Kick(playerid);
      }
      return 1;
   }
        return 1;
}
Mostre onde Textdraw2 e Textdraw4 estгo criados.
Reply
#7

Coloque a tag PlayerText:

exemplo

PlayerText:Textdraw4[playerid]
Reply
#8

Quote:
Originally Posted by Electrifying
Посмотреть сообщение
Coloque a tag PlayerText:

exemplo

PlayerText:Textdraw4[playerid]
aonde eu adiciono isso
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)