[Help] Fixing errors -
KingPersona - 01.06.2014
hello
i need help please , can you help me the fix this errors (
Код:
D:\Documents and Settings\Administrateur\Mes documents\Downloads\Nouveau dossier\Booter\gamemodes\booterxd.pwn(11248) : warning 209: function "cmd_cionrde" should return a value
D:\Documents and Settings\Administrateur\Mes documents\Downloads\Nouveau dossier\Booter\gamemodes\booterxd.pwn(11249) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Mes documents\Downloads\Nouveau dossier\Booter\gamemodes\booterxd.pwn(11252) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Mes documents\Downloads\Nouveau dossier\Booter\gamemodes\booterxd.pwn(11255) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Mes documents\Downloads\Nouveau dossier\Booter\gamemodes\booterxd.pwn(11294) : warning 219: local variable "szMessage" shadows a variable at a preceding level
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23319) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23321) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23323) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(29825) : warning 203: symbol is never used: "szMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
Line
(1124 at (11255)
Full code:
pawn Код:
CMD:cionrde( playerid, params[] )
{
if(CiorditTimp[playerid] == 0)
{
new banili = random(1000) + 500;
new nume1[24],
nume2[24];
new string[128];
GetPlayerName(playerid, nume1, sizeof(nume1));
format(string, 128, "%s ti-a ciordit {228B22}${FFFFFF}%d din buzunar!", nume1, banili);
new ID, victima;
SCM(ID, -1, string);
format(string, 128, "I-ai ciordit lui %s {228B22}${FFFFFF}%d din buzunar!", nume2, banili);
SCM(playerid, -1, string);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerMoney(playerid, banili);
GivePlayerMoney(victima, -banili);
CiorditTimp[playerid] = 1;
SetTimerEx("ciordealatimp", 120000, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu e nimeni langa tine!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 2 minute intre ciordiri!");
return 1;
}
}
return 1;
}
Line Warning
(11294)
Lines
(23319) at (23323)
pawn Код:
foreach(Player, i)
{
if(PlayerInfo[i][pAdminLevel] >= 1)
{
if(BigEars[i] == 1)
Re: [Help] Fixing errors -
AnonScripter - 01.06.2014
you cannot make 2 "else" with one "if"
so here you go:
pawn Код:
CMD:cionrde(playerid, params[])
{
if(CiorditTimp[playerid] == 0)
{
new string[128], nume1[24], nume2[24], ID, victima;
new banili = random(1000) + 500;
GetPlayerName(playerid, nume1, sizeof(nume1));
format(string, 128, "%s ti-a ciordit {228B22}${FFFFFF}%d din buzunar!", nume1, banili);
SCM(ID, -1, string);
format(string, 128, "I-ai ciordit lui %s {228B22}${FFFFFF}%d din buzunar!", nume2, banili);
SCM(playerid, -1, string);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerMoney(playerid, banili);
GivePlayerMoney(victima, -banili);
CiorditTimp[playerid] = 1;
SetTimerEx("ciordealatimp", 120000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu e nimeni langa tine!");
}
return 1;
}
Re: [Help] Fixing errors -
KingPersona - 01.06.2014
Thanks for Help, and Thanks for answer
Fixed
i have now this errors
Код:
D:\DOCUME~1\ADMINI~1\MESDOC~1\DOWNLO~1\NOUVEA~1\Srp\GAMEMO~1\srp.pwn(11248) : warning 209: function "cmd_cionrde" should return a value
D:\DOCUME~1\ADMINI~1\MESDOC~1\DOWNLO~1\NOUVEA~1\Srp\GAMEMO~1\srp.pwn(11286) : warning 219: local variable "szMessage" shadows a variable at a preceding level
D:\DOCUME~1\ADMINI~1\MESDOC~1\DOWNLO~1\NOUVEA~1\Srp\GAMEMO~1\srp.pwn(23311) : error 010: invalid function or declaration
D:\DOCUME~1\ADMINI~1\MESDOC~1\DOWNLO~1\NOUVEA~1\Srp\GAMEMO~1\srp.pwn(23313) : error 010: invalid function or declaration
D:\DOCUME~1\ADMINI~1\MESDOC~1\DOWNLO~1\NOUVEA~1\Srp\GAMEMO~1\srp.pwn(23315) : error 010: invalid function or declaration
D:\DOCUME~1\ADMINI~1\MESDOC~1\DOWNLO~1\NOUVEA~1\Srp\GAMEMO~1\srp.pwn(29817) : warning 203: symbol is never used: "szMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: [Help] Fixing errors -
KingPersona - 01.06.2014
Bump
Re: [Help] Fixing errors -
Eth - 01.06.2014
show me the error line 23311 and 23313 and 23315 and the full code after the previous editing.
Re: [Help] Fixing errors -
KingPersona - 02.06.2014
ok
Line : 23311 :
Line 23313:
pawn Код:
if(PlayerInfo[i][pAdminLevel] >= 1)
line 23315 :
Full Code :
pawn Код:
new szMessage[256];
foreach(Player, i)
{
if(PlayerInfo[i][pAdminLevel] >= 1)
{
if(BigEars[i] == 1)
{
format(szLargeString, sizeof(szLargeString), "BigEars: %s", szMessage);
SendClientMessage(playerid, COLOR_LIGHTRED, szLargeString);
}
}
}
__________________________________________________ ____________________________
Re: [Help] Fixing errors -
Eth - 02.06.2014
the full code should be:
pawn Код:
new szMessage[256];
foreach (new i : Player)
{
{
if(PlayerInfo[i][pAdminLevel] >= 1)
{
if(BigEars[i] == 1)
{
format(szLargeString, sizeof(szLargeString), "BigEars: %s", szMessage);
SendClientMessage(playerid, COLOR_LIGHTRED, szLargeString);
}
}
}
Re: [Help] Fixing errors -
KingPersona - 02.06.2014
4 ERRORS
Код:
D:\Documents and Settings\Administrateur\MDocuments\Downloads\New Folder\Srp\gamemodes\srp.pwn(11248) : warning 209: function "cmd_cionrde" should return a value
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(11286) : warning 219: local variable "szMessage" shadows a variable at a preceding level
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23311) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23311) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23314) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23316) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(29817) : warning 203: symbol is never used: "foreach"
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(29817) : warning 203: symbol is never used: "szMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: [Help] Fixing errors -
Eth - 02.06.2014
use this:
pawn Код:
for (new i = 0; i != MAX_PLAYERS; ++i)
{
if(PlayerInfo[i][pAdminLevel] >= 1)
{
if(BigEars[i] == 1)
{
format(szLargeString, sizeof(szLargeString), "BigEars: %s", szMessage);
SendClientMessage(playerid, COLOR_LIGHTRED, szLargeString);
}
}
}
Re: [Help] Fixing errors -
KingPersona - 02.06.2014
Is again Errors in thats code you gived me (
Код:
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(11248) : warning 209: function "cmd_cionrde" should return a value
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(11286) : warning 219: local variable "szMessage" shadows a variable at a preceding level
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23311) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23314) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(23316) : error 010: invalid function or declaration
D:\Documents and Settings\Administrateur\Documents\Downloads\New Folder\Srp\gamemodes\srp.pwn(29817) : warning 203: symbol is never used: "szMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.