Error Dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error Dialog (
/showthread.php?tid=653985)
Error Dialog -
leobpo - 18.05.2018
I added a new dialog in public OnDialogResponse, and the following errors appeared
PHP код:
C:\Users\Leonardo\Desktop\Brasil Play Games\pawno\include\sscanf2.inc(172) : error 017: undefined symbol "SSCANF_OnGameModeInit"
C:\Users\Leonardo\Desktop\Brasil Play Games\pawno\include\sscanf2.inc(203) : error 017: undefined symbol "SSCANF_OnPlayerConnect"
C:\Users\Leonardo\Desktop\Brasil Play Games\pawno\include\sscanf2.inc(227) : error 017: undefined symbol "SSCANF_OnPlayerDisconnect"
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(3863) : warning 219: local variable "giveplayerid" shadows a variable at a preceding level
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(3955) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4006) : error 004: function "split" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4071) : error 004: function "split" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4140) : error 004: function "split" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4155) : error 004: function "CarregarCarros" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4200) : error 017: undefined symbol "NomeORG"
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4234) : error 017: undefined symbol "NomeORG"
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4342) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4349) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4359) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4364) : error 004: function "CarrosColheta" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4379) : error 004: function "CarrosColheta" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4403) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4416) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4419) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4421) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4423) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4431) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4440) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4443) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4445) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4447) : error 079: inconsistent return types (array & non-array)
C:\Users\Leonardo\Desktop\Brasil Play Games\gamemodes\BPG.pwn(4454) : error 079: inconsistent return types (array & non-array)
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
PHP код:
if (dialogid == Menu_Vip)
{
if (response == 0)
{
return true;
}
switch (listitem)
{
case 0:
{
cmd_comprarcash(playerid);
}
case 1:
{
if (JogadorInfo[playerid][pCoins] < 5)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Você não Tem 5 de Cash");
}
else
{
JogadorInfo[playerid][pVIP] = 1;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Você Comprou VIP Bronze por 5 de Cash");
JogadorInfo[playerid][pCoins] -= 5;
AtualizarCash(playerid);
}
}
case 2:
{
if (JogadorInfo[playerid][pCoins] < 10)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Você não Tem 10 de Cash");
}
else
{
JogadorInfo[playerid][pVIP] = 2;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Você Comprou VIP PRATA por 10 de Cash");
JogadorInfo[playerid][pCoins] -= 10;
AtualizarCash(playerid);
}
}
case 3:
{
if (JogadorInfo[playerid][pCoins] < 12)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Você não Tem 12 de Cash");
}
else
{
JogadorInfo[playerid][pVIP] = 3;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Você Comprou VIP OURO por 12 de Cash");
JogadorInfo[playerid][pCoins] -= 15;
AtualizarCash(playerid);
}
}
case 4:
{
if (JogadorInfo[playerid][pCoins] < 15)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Você não Tem 15 Cash");
}
else
{
JogadorInfo[playerid][pSocio] = 1;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Você Comprou Socio Bronze Por 15 de Cash");
JogadorInfo[playerid][pCoins] -= 15;
AtualizarCash(playerid);
}
}
case 5:
{
if (JogadorInfo[playerid][pCoins] < 20)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Você Não Tem 20 de Cash");
}
else
{
JogadorInfo[playerid][pSocio] = 2;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Você Comprou Socio Prata Por 20 de Cash");
JogadorInfo[playerid][pCoins] -= 20;
AtualizarCash(playerid);
}
}
case 6:
{
if (JogadorInfo[playerid][pCoins] < 25)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Você Não Tem 25 de Cash");
}
else
{
JogadorInfo[playerid][pSocio] = 3;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Você Comprou Socio Ouro Por 30 de Cash");
JogadorInfo[playerid][pCoins] -= 25;
AtualizarCash(playerid);
}
}
}
}
return 1;
}
Re: Error Dialog -
Vennox - 19.05.2018
Look at this screenshot from your code. The
{ } are highlighted with red
You put an extra } there, your code should be:
PHP код:
if (dialogid == Menu_Vip)
{
if (response == 0)
{
return true;
}
switch (listitem)
{
case 0:
{
cmd_comprarcash(playerid);
}
case 1:
{
if (JogadorInfo[playerid][pCoins] < 5)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Vocк nгo Tem 5 de Cash");
}
else
{
JogadorInfo[playerid][pVIP] = 1;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Vocк Comprou VIP Bronze por 5 de Cash");
JogadorInfo[playerid][pCoins] -= 5;
AtualizarCash(playerid);
}
}
case 2:
{
if (JogadorInfo[playerid][pCoins] < 10)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Vocк nгo Tem 10 de Cash");
}
else
{
JogadorInfo[playerid][pVIP] = 2;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Vocк Comprou VIP PRATA por 10 de Cash");
JogadorInfo[playerid][pCoins] -= 10;
AtualizarCash(playerid);
}
}
case 3:
{
if (JogadorInfo[playerid][pCoins] < 12)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Vocк nгo Tem 12 de Cash");
}
else
{
JogadorInfo[playerid][pVIP] = 3;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Vocк Comprou VIP OURO por 12 de Cash");
JogadorInfo[playerid][pCoins] -= 15;
AtualizarCash(playerid);
}
}
case 4:
{
if (JogadorInfo[playerid][pCoins] < 15)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Vocк nгo Tem 15 Cash");
}
else
{
JogadorInfo[playerid][pSocio] = 1;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Vocк Comprou Socio Bronze Por 15 de Cash");
JogadorInfo[playerid][pCoins] -= 15;
AtualizarCash(playerid);
}
}
case 5:
{
if (JogadorInfo[playerid][pCoins] < 20)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Vocк Nгo Tem 20 de Cash");
}
else
{
JogadorInfo[playerid][pSocio] = 2;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Vocк Comprou Socio Prata Por 20 de Cash");
JogadorInfo[playerid][pCoins] -= 20;
AtualizarCash(playerid);
}
}
case 6:
{
if (JogadorInfo[playerid][pCoins] < 25)
{
SendClientMessage(playerid, COR_ADMIN, "{7CFC00}ERRO: {D3D3D3}Vocк Nгo Tem 25 de Cash");
}
else
{
JogadorInfo[playerid][pSocio] = 3;
SendClientMessage(playerid, 0x00FF00FF, "{7CFC00}[ Menu Vip ]: {D3D3D3}Vocк Comprou Socio Ouro Por 30 de Cash");
JogadorInfo[playerid][pCoins] -= 25;
AtualizarCash(playerid);
}
}
}
}
Re: Error Dialog -
leobpo - 19.05.2018
Error still persist friend, when I add scrip at the beginning of the function does not present any error, but within the game buga the system, instead of being my cash presents another of something farmer, The dialogs below have some numbers