conversão - manow6523 - 16/02/2024
Estou tentando converter o meu GM para o Open-MP e no meio de tantos warnings/erros, esses em especial são alguns dos que não consigo corrigir:
Código: C:\open.mp-win-x86\Server\qawno\include\DOF2.inc(1061) : warning 213: tag mismatch: expected tag "bool", but found none ("_")
C:\open.mp-win-x86\Server\qawno\include\DOF2.inc(1061) : warning 202: number of arguments does not match definition
linha 1061 no arquivo DOF2.inc:
Código: c = fgetchar (f, 0, UseUTF8);
Alguém sabe do que se trata?
RE: conversão - xbruno1000x - 16/02/2024
No topo:
Código: #pragma disable warning 202
#pragma disable warning 213
RE: conversão - manow6523 - 16/02/2024
(16/02/2024 15:51)xbruno1000x Escreveu: No topo:
Código: #pragma disable warning 202
#pragma disable warning 213
Código: E:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(440) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(519) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(584) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(596) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(614) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(629) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(643) : warning 219: local variable "bs" shadows a variable at a preceding level
Nesse caso o recomendado também seria ocultar os warnings 219?
RE: conversão - xbruno1000x - 16/02/2024
(16/02/2024 18:10)manow6523 Escreveu: (16/02/2024 15:51)xbruno1000x Escreveu: No topo:
Código: #pragma disable warning 202
#pragma disable warning 213
Código: E:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(440) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(519) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(584) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(596) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(614) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(629) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(643) : warning 219: local variable "bs" shadows a variable at a preceding level
Nesse caso o recomendado também seria ocultar os warnings 219?
Eu costumo ocultar 202, 213 e 219. Quando você começa a usar o compilador da comunidade eles atrapalham muito, são tantos warnings que fica difícil de ver os erros.
RE: conversão - manow6523 - 17/02/2024
(16/02/2024 19:27)xbruno1000x Escreveu: (16/02/2024 18:10)manow6523 Escreveu: (16/02/2024 15:51)xbruno1000x Escreveu: No topo:
Código: #pragma disable warning 202
#pragma disable warning 213
Código: E:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(440) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(519) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(584) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(596) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(614) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(629) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(643) : warning 219: local variable "bs" shadows a variable at a preceding level
Nesse caso o recomendado também seria ocultar os warnings 219?
Eu costumo ocultar 202, 213 e 219. Quando você começa a usar o compilador da comunidade eles atrapalham muito, são tantos warnings que fica difícil de ver os erros.
Entendi, obrigado pelos esclarecimentos. E sobre essa função não funcionar no Open-MP:
Código: stock ConverterTexto(string[])
{
for(new arraysize = 0; arraysize < strlen(string); arraysize++)
{
if(strfind(string, "â", true) != -1){new pos = strfind(string, "â", true); strdel(string, pos, pos+strlen("â")); strins(string, "™", pos, sizeof(pos));}
if(strfind(string, "ã", true) != -1){new pos = strfind(string, "ã", true); strdel(string, pos, pos+strlen("ã")); strins(string, "š", pos, sizeof(pos));}
if(strfind(string, "á", true) != -1){new pos = strfind(string, "á", true); strdel(string, pos, pos+strlen("á")); strins(string, "˜", pos, sizeof(pos));}
if(strfind(string, "é", true) != -1){new pos = strfind(string, "é", true); strdel(string, pos, pos+strlen("é")); strins(string, "ž", pos, sizeof(pos));}
if(strfind(string, "ú", true) != -1){new pos = strfind(string, "ú", true); strdel(string, pos, pos+strlen("ú")); strins(string, "“", pos, sizeof(pos));}
if(strfind(string, "ó", true) != -1){new pos = strfind(string, "ó", true); strdel(string, pos, pos+strlen("ó")); strins(string, "¦", pos, sizeof(pos));}
if(strfind(string, "ê", true) != -1){new pos = strfind(string, "ê", true); strdel(string, pos, pos+strlen("ê")); strins(string, "Ÿ", pos, sizeof(pos));}
if(strfind(string, "í", true) != -1){new pos = strfind(string, "í", true); strdel(string, pos, pos+strlen("í")); strins(string, "¢", pos, sizeof(pos));}
if(strfind(string, "ç", true) != -1){new pos = strfind(string, "ç", true); strdel(string, pos, pos+strlen("ç")); strins(string, "œ", pos, sizeof(pos));}
if(strfind(string, "ô", true) != -1){new pos = strfind(string, "ô", true); strdel(string, pos, pos+strlen("ô")); strins(string, "§", pos, sizeof(pos));}
}
}
O que pode ser?
RE: conversão - White_Blue - 17/02/2024
(17/02/2024 01:33)manow6523 Escreveu: (16/02/2024 19:27)xbruno1000x Escreveu: (16/02/2024 18:10)manow6523 Escreveu: (16/02/2024 15:51)xbruno1000x Escreveu: No topo:
Código: #pragma disable warning 202
#pragma disable warning 213
Código: E:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(440) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(519) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(584) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(596) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(614) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(629) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(643) : warning 219: local variable "bs" shadows a variable at a preceding level
Nesse caso o recomendado também seria ocultar os warnings 219?
Eu costumo ocultar 202, 213 e 219. Quando você começa a usar o compilador da comunidade eles atrapalham muito, são tantos warnings que fica difícil de ver os erros.
Entendi, obrigado pelos esclarecimentos. E sobre essa função não funcionar no Open-MP:
Código: stock ConverterTexto(string[])
{
for(new arraysize = 0; arraysize < strlen(string); arraysize++)
{
if(strfind(string, "â", true) != -1){new pos = strfind(string, "â", true); strdel(string, pos, pos+strlen("â")); strins(string, "™", pos, sizeof(pos));}
if(strfind(string, "ã", true) != -1){new pos = strfind(string, "ã", true); strdel(string, pos, pos+strlen("ã")); strins(string, "š", pos, sizeof(pos));}
if(strfind(string, "á", true) != -1){new pos = strfind(string, "á", true); strdel(string, pos, pos+strlen("á")); strins(string, "˜", pos, sizeof(pos));}
if(strfind(string, "é", true) != -1){new pos = strfind(string, "é", true); strdel(string, pos, pos+strlen("é")); strins(string, "ž", pos, sizeof(pos));}
if(strfind(string, "ú", true) != -1){new pos = strfind(string, "ú", true); strdel(string, pos, pos+strlen("ú")); strins(string, "“", pos, sizeof(pos));}
if(strfind(string, "ó", true) != -1){new pos = strfind(string, "ó", true); strdel(string, pos, pos+strlen("ó")); strins(string, "¦", pos, sizeof(pos));}
if(strfind(string, "ê", true) != -1){new pos = strfind(string, "ê", true); strdel(string, pos, pos+strlen("ê")); strins(string, "Ÿ", pos, sizeof(pos));}
if(strfind(string, "í", true) != -1){new pos = strfind(string, "í", true); strdel(string, pos, pos+strlen("í")); strins(string, "¢", pos, sizeof(pos));}
if(strfind(string, "ç", true) != -1){new pos = strfind(string, "ç", true); strdel(string, pos, pos+strlen("ç")); strins(string, "œ", pos, sizeof(pos));}
if(strfind(string, "ô", true) != -1){new pos = strfind(string, "ô", true); strdel(string, pos, pos+strlen("ô")); strins(string, "§", pos, sizeof(pos));}
}
}
O que pode ser?
Creio que seja um problema de encoding, já que o open.mp é obviamente mais moderno que o SA-MP. Portanto, certos frameworks e dependências podem funcionar em versões diferentes do SA-MP, e os métodos também podem ser diferentes, o que pode resultar em incompatibilidade entre as funções.
Tente esta função:
Código PHP: stock FixText(const string[]) { new szFixed[1024], iPos, iLen;
for(iLen = strlen(string); iPos < iLen; iPos ++) switch(string[iPos]) { case '%': szFixed[iPos] = 37; case '&': szFixed[iPos] = 38; case '¡': szFixed[iPos] = 64; case '°': szFixed[iPos] = 124; case 'À': szFixed[iPos] = 128; case 'Á': szFixed[iPos] = 129; case 'Â': szFixed[iPos] = 130; case 'Ä', 'Ã': szFixed[iPos] = 131; case 'Ç': szFixed[iPos] = 133; case 'È': szFixed[iPos] = 134; case 'É': szFixed[iPos] = 135; case 'Ê': szFixed[iPos] = 136; case 'Ë': szFixed[iPos] = 137; case 'Ì': szFixed[iPos] = 138; case 'Í': szFixed[iPos] = 139; case 'Î': szFixed[iPos] = 140; case 'Ï': szFixed[iPos] = 141; case 'Ò': szFixed[iPos] = 142; case 'Ó': szFixed[iPos] = 143; case 'Ô': szFixed[iPos] = 144; case 'Ö', 'Õ': szFixed[iPos] = 145; case 'Ù': szFixed[iPos] = 146; case 'Ú': szFixed[iPos] = 147; case 'Û': szFixed[iPos] = 148; case 'Ü': szFixed[iPos] = 149; case 'à': szFixed[iPos] = 151; case 'á': szFixed[iPos] = 152; case 'â': szFixed[iPos] = 153; case 'ä', 'ã': szFixed[iPos] = 154; case 'ç': szFixed[iPos] = 156; case 'è': szFixed[iPos] = 157; case 'é': szFixed[iPos] = 158; case 'ê': szFixed[iPos] = 159; case 'ë': szFixed[iPos] = 160; case 'ì': szFixed[iPos] = 161; case 'í': szFixed[iPos] = 162; case 'î': szFixed[iPos] = 163; case 'ï': szFixed[iPos] = 164; case 'ò': szFixed[iPos] = 165; case 'ó': szFixed[iPos] = 166; case 'ô': szFixed[iPos] = 167; case 'ö', 'õ': szFixed[iPos] = 168; case 'ù': szFixed[iPos] = 169; case 'ú': szFixed[iPos] = 170; case 'û': szFixed[iPos] = 171; case 'ü': szFixed[iPos] = 172; case 'Ñ': szFixed[iPos] = 173; case 'ñ': szFixed[iPos] = 174; case '¿': szFixed[iPos] = 175; case '`': szFixed[iPos] = 177; default: szFixed[iPos] = string[iPos]; } return szFixed; }
RE: conversão - manow6523 - 17/02/2024
(17/02/2024 03:20)White_Blue Escreveu: (17/02/2024 01:33)manow6523 Escreveu: (16/02/2024 19:27)xbruno1000x Escreveu: (16/02/2024 18:10)manow6523 Escreveu: (16/02/2024 15:51)xbruno1000x Escreveu: No topo:
Código: #pragma disable warning 202
#pragma disable warning 213
Código: E:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(440) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(519) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(584) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(596) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(614) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(629) : warning 219: local variable "bs" shadows a variable at a preceding level
C:\open.mp-win-x86\Server\qawno\include\Pawn.RakNet.inc(643) : warning 219: local variable "bs" shadows a variable at a preceding level
Nesse caso o recomendado também seria ocultar os warnings 219?
Eu costumo ocultar 202, 213 e 219. Quando você começa a usar o compilador da comunidade eles atrapalham muito, são tantos warnings que fica difícil de ver os erros.
Entendi, obrigado pelos esclarecimentos. E sobre essa função não funcionar no Open-MP:
Código: stock ConverterTexto(string[])
{
for(new arraysize = 0; arraysize < strlen(string); arraysize++)
{
if(strfind(string, "â", true) != -1){new pos = strfind(string, "â", true); strdel(string, pos, pos+strlen("â")); strins(string, "™", pos, sizeof(pos));}
if(strfind(string, "ã", true) != -1){new pos = strfind(string, "ã", true); strdel(string, pos, pos+strlen("ã")); strins(string, "š", pos, sizeof(pos));}
if(strfind(string, "á", true) != -1){new pos = strfind(string, "á", true); strdel(string, pos, pos+strlen("á")); strins(string, "˜", pos, sizeof(pos));}
if(strfind(string, "é", true) != -1){new pos = strfind(string, "é", true); strdel(string, pos, pos+strlen("é")); strins(string, "ž", pos, sizeof(pos));}
if(strfind(string, "ú", true) != -1){new pos = strfind(string, "ú", true); strdel(string, pos, pos+strlen("ú")); strins(string, "“", pos, sizeof(pos));}
if(strfind(string, "ó", true) != -1){new pos = strfind(string, "ó", true); strdel(string, pos, pos+strlen("ó")); strins(string, "¦", pos, sizeof(pos));}
if(strfind(string, "ê", true) != -1){new pos = strfind(string, "ê", true); strdel(string, pos, pos+strlen("ê")); strins(string, "Ÿ", pos, sizeof(pos));}
if(strfind(string, "í", true) != -1){new pos = strfind(string, "í", true); strdel(string, pos, pos+strlen("í")); strins(string, "¢", pos, sizeof(pos));}
if(strfind(string, "ç", true) != -1){new pos = strfind(string, "ç", true); strdel(string, pos, pos+strlen("ç")); strins(string, "œ", pos, sizeof(pos));}
if(strfind(string, "ô", true) != -1){new pos = strfind(string, "ô", true); strdel(string, pos, pos+strlen("ô")); strins(string, "§", pos, sizeof(pos));}
}
}
O que pode ser?
Creio que seja um problema de encoding, já que o open.mp é obviamente mais moderno que o SA-MP. Portanto, certos frameworks e dependências podem funcionar em versões diferentes do SA-MP, e os métodos também podem ser diferentes, o que pode resultar em incompatibilidade entre as funções.
Tente esta função:
Código PHP: stock FixText(const string[]) { new szFixed[1024], iPos, iLen;
for(iLen = strlen(string); iPos < iLen; iPos ++) switch(string[iPos]) { case '%': szFixed[iPos] = 37; case '&': szFixed[iPos] = 38; case '¡': szFixed[iPos] = 64; case '°': szFixed[iPos] = 124; case 'À': szFixed[iPos] = 128; case 'Á': szFixed[iPos] = 129; case 'Â': szFixed[iPos] = 130; case 'Ä', 'Ã': szFixed[iPos] = 131; case 'Ç': szFixed[iPos] = 133; case 'È': szFixed[iPos] = 134; case 'É': szFixed[iPos] = 135; case 'Ê': szFixed[iPos] = 136; case 'Ë': szFixed[iPos] = 137; case 'Ì': szFixed[iPos] = 138; case 'Í': szFixed[iPos] = 139; case 'Î': szFixed[iPos] = 140; case 'Ï': szFixed[iPos] = 141; case 'Ò': szFixed[iPos] = 142; case 'Ó': szFixed[iPos] = 143; case 'Ô': szFixed[iPos] = 144; case 'Ö', 'Õ': szFixed[iPos] = 145; case 'Ù': szFixed[iPos] = 146; case 'Ú': szFixed[iPos] = 147; case 'Û': szFixed[iPos] = 148; case 'Ü': szFixed[iPos] = 149; case 'à': szFixed[iPos] = 151; case 'á': szFixed[iPos] = 152; case 'â': szFixed[iPos] = 153; case 'ä', 'ã': szFixed[iPos] = 154; case 'ç': szFixed[iPos] = 156; case 'è': szFixed[iPos] = 157; case 'é': szFixed[iPos] = 158; case 'ê': szFixed[iPos] = 159; case 'ë': szFixed[iPos] = 160; case 'ì': szFixed[iPos] = 161; case 'í': szFixed[iPos] = 162; case 'î': szFixed[iPos] = 163; case 'ï': szFixed[iPos] = 164; case 'ò': szFixed[iPos] = 165; case 'ó': szFixed[iPos] = 166; case 'ô': szFixed[iPos] = 167; case 'ö', 'õ': szFixed[iPos] = 168; case 'ù': szFixed[iPos] = 169; case 'ú': szFixed[iPos] = 170; case 'û': szFixed[iPos] = 171; case 'ü': szFixed[iPos] = 172; case 'Ñ': szFixed[iPos] = 173; case 'ñ': szFixed[iPos] = 174; case '¿': szFixed[iPos] = 175; case '`': szFixed[iPos] = 177; default: szFixed[iPos] = string[iPos]; } return szFixed; }
Entendi. Essa função que você passou é até melhor que a outra, obrigado!
Existe alguma forma de ativar um debug no Open-MP que mostre o número da linha no GM assim como é no SA-MP ao colocar '-d3' na task?
RE: conversão - xbruno1000x - 17/02/2024
(17/02/2024 19:27)manow6523 Escreveu: Entendi. Essa função que você passou é até melhor que a outra, obrigado!
Existe alguma forma de ativar um debug no Open-MP que mostre o número da linha no GM assim como é no SA-MP ao colocar '-d3' na task?
Acredito que o plugin crashdetect funcione tanto no SA-MP quanto no Open-MP normalmente.
|