[AJUDA] 4 erros
#1

pawn Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(543) : error 017: undefined symbol "string"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(543) : error 017: undefined symbol "string"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(543) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(543) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Tentei pegar um /av para admin de outro gm e adaptei pro meu e deu esses erros...

Aqui tб o comando inteiro:

pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
        GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
Ajuda aн galera... Valeu.
Reply
#2

Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
new string[256];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
        GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
Tenta isso , o erro й por que voзк nao definio a string...
Espero ter ajudado atй mais
Reply
#3

pawn Код:
new string[256];
Reply
#4

DJ...

Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(544) : error 017: undefined symbol "sendername"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
E Domozinho o seu code da milhares de erros...

Ajuda aк Dj
Reply
#5

Vocк tem q declarar o que й essa "string", assim vocк pode usar:

pawn Код:
new string[256];// para limitar em 256 caracteres
@Edit

Testa esse:

pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
            GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            new string[256];
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
Reply
#6

Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(379) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dini.inc(241) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(80) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(186) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(202) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(228) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(246) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(267) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(288) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(304) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(329) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(351) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(364) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(383) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(416) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(447) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(488) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(544) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(546) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(598) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(618) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(648) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(659) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(673) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(689) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(714) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(739) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(803) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(825) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(839) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(870) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(900) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(923) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(965) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1031) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1122) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1194) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1212) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#7

Quote:
Originally Posted by deregudegu
Посмотреть сообщение
Vocк tem q declarar o que й essa "string", assim vocк pode usar:

pawn Код:
new string[256];// para limitar em 256 caracteres
@Edit

Testa esse:

pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
            GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            new string[256];
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
PS: O ideal seria ele definir as variaves que precisam ser usadas no comando, ou no inicio de OnPlayerCommand Ou no inicio do comando, ou seja no local onde eu coloquei assim ele nao vai precisar ficar definindo a msm variavel 3 ou mais veses pelo mesmo comando. No caso ate iria funcionar mas o ideal й que seja comao falei...







Quote:
Originally Posted by [AF]Junior
Посмотреть сообщение
DJ...

Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(544) : error 017: undefined symbol "sendername"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
E Domozinho o seu code da milhares de erros...

Ajuda aк Dj
Fmz... Mals ae fui jantar... Cara "undefined symbol "sendername"" й so definir, sendername... agora a linha 544 й junto com o CMD? se for й so add assim...

Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
new string[256];
new sendername[MAX_PLAYER_NAME];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
        GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
Nгo testei qualquer duvida/problema manda ae ...
Reply
#8

pawn Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(379) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dini.inc(241) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(80) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(186) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(202) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(228) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(246) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(267) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(288) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(304) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(329) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(351) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(364) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(383) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(416) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(447) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(488) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(518) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(599) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(619) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(649) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(660) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(674) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(690) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(715) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(740) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(804) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(826) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(840) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(871) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(901) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(924) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(966) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1032) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1123) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1195) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1213) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


42 Warnings.
Reply
#9

Quote:
Originally Posted by [AF]Junior
Посмотреть сообщение
pawn Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dutils.inc(379) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\pawno\include\dini.inc(241) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(80) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(186) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(202) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(228) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(246) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(267) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(288) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(304) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(329) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(351) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(364) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(383) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(416) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(447) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(488) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(518) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(599) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(619) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(649) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(660) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(674) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(690) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(715) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(740) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(804) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(826) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(840) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(871) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(901) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(924) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(966) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1032) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1123) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1195) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Register_Login.pwn(1213) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


42 Warnings.
LoL... Vc definiu a string em um lugar que ate seria bom, se vc nao tivesse definido nenhuma ainda ao longo do GM/FS procura ai no inicio do gamemode ou no OnPlayerCommand onde vc tenha definido a string e deleta so a que tiver bem no topo msm... Mas vc viu? 0 erro somente warn, quando vc fizer o que falei provavelmente va ficar normal sem erros ou warns...

Qualquer duvida ja sabe...
Reply
#10

Quote:
Originally Posted by Dj_Paradox
Посмотреть сообщение
Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
new string[256];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
        GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
Tenta isso , o erro й por que voзк nao definio a string...
Espero ter ajudado atй mais
pawn Код:
if(strcmp(cmd,"/avisar",true)==0)
    {
        if(PlayerInfo[playerid][PlayerAdmin] > 1)
        {
            new result[128];
            result = strtok(cmdtext, idx);
            if(!strlen(result))
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "USE: /avisar [texto]");
                return 1;
            }
            new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        new string[128];
                        SendClientMessageToAll(0xFFFFFFAA, "-- Aviso da Administraзгo [TAG] --");
                        format(string,sizeof(string),"Administrador: %s %s", sendername, (result));
                        SendClientMessageToAll(0xFFFFFFAA, string);
            }
        return 1;
    }
Nгo precisa ter o comando grandгo --'
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)