Error's -
Karlasx - 28.08.2015
How to fix these errors i don't know
(41148 ) : error 029: invalid expression, assumed zero
(41214) : error 029: invalid expression, assumed zero
(41269) : error 029: invalid expression, assumed zero
(41325) : error 029: invalid expression, assumed zero
(41989) : error 029: invalid expression, assumed zero
-----------------------
Here's the code on line 41148
---------------------------
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Morate da imate oruzje da bi pljackali");
return 1;
}
}
else //LINE 41148 There's error showing
{
SendClientMessage(playerid, COLOR_GREY, "Niste u opstini");
return 1;
Re: Error's -
SoFahim - 28.08.2015
PHP код:
else
{
SendClientMessage(playerid, COLOR_GREY, "Morate da imate oruzje da bi pljackali");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Niste u opstini");
}
return 1;
It would be good if you give full script from that
Re: Error's -
Karlasx - 28.08.2015
Код:
if(strcmp(cmd, "/opljackajopstinu", true) == 0)
{
new success = random(2);
new popstinarobtime = PlayerInfo[playerid][pRobTime];
if(CityHallRobbedRecently == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Ova lokacija je vec bila opljackana, pokusajte kasnije");
// return 1;
}
if(PlayerInfo[playerid][pRobTime] >= 1)
{
format(string, sizeof(string),"Skoro si pljackao, moras sacekati jos %d min da bi opet mogao da pljackas", (popstinarobtime / 60));
SendClientMessage(playerid, COLOR_GREY, string);
// return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2, 358.5919,184.2908,1008.3828))
return 1;
{
if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40)
{
if(PlayerInfo[playerid][pDuty] == 0)
{
if(success == 1)
{
CityHallRobbedRecently = 1;
new money = random(10000);
SafeGivePlayerMoney(playerid, money);
format(string, sizeof(string),"~w~Opljackali ste opstinu i uzeli ~g~%d$ !", money);
GameTextForPlayer(playerid, string, 6000, 4);
format(string, sizeof(string),"Opljackali ste opstinu i uzeli %d$ !",money);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "{48E31C}[BW vanredne vesti] {ADADAD}Upravo je opljackana opstina");
SendClientMessageToAll(COLOR_NICERED, string);
WantedPoints[playerid] = 6;
SetPlayerCriminal(playerid,255, "Pljacka Opstine");
PlayerInfo[playerid][pRobTime] = 900;
SetTimer("UnsetCityHallRob",1800000,false);
OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "Niste uspeli opljackati Opstinu");
WantedPoints[playerid] = 2;
SetPlayerCriminal(playerid,255, "Pokusaj pljacke Opstine");
PlayerInfo[playerid][pRobTime] = 500;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Morate napustiti duznost");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Morate da imate oruzje da bi pljackali");
return 1;
}
}
else //line 41148
{
SendClientMessage(playerid, COLOR_GREY, "Niste u opstini");
return 1;
}
// return 1;
}
Re: Error's -
SoFahim - 28.08.2015
delete all return 1; from the line Which contain SendclientMassage
Like
PHP код:
SendClientMassage
return 1; //delete this
Re: Error's -
Karlasx - 28.08.2015
Код:
if(strcmp(cmd, "/opljackajopstinu", true) == 0)
{
new success = random(2);
new popstinarobtime = PlayerInfo[playerid][pRobTime];
if(CityHallRobbedRecently == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Ova lokacija je vec bila opljackana, pokusajte kasnije");
// return 1;
}
if(PlayerInfo[playerid][pRobTime] >= 1)
{
format(string, sizeof(string),"Skoro si pljackao, moras sacekati jos %d min da bi opet mogao da pljackas", (popstinarobtime / 60));
SendClientMessage(playerid, COLOR_GREY, string);
// return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2, 358.5919,184.2908,1008.3828))
return 1;
{
if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40)
{
if(PlayerInfo[playerid][pDuty] == 0)
{
if(success == 1)
{
CityHallRobbedRecently = 1;
new money = random(10000);
SafeGivePlayerMoney(playerid, money);
format(string, sizeof(string),"~w~Opljackali ste opstinu i uzeli ~g~%d$ !", money);
GameTextForPlayer(playerid, string, 6000, 4);
format(string, sizeof(string),"Opljackali ste opstinu i uzeli %d$ !",money);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "{48E31C}[BW vanredne vesti] {ADADAD}Upravo je opljackana opstina");
SendClientMessageToAll(COLOR_NICERED, string);
WantedPoints[playerid] = 6;
SetPlayerCriminal(playerid,255, "Pljacka Opstine");
PlayerInfo[playerid][pRobTime] = 900;
SetTimer("UnsetCityHallRob",1800000,false);
OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "Niste uspeli opljackati Opstinu");
WantedPoints[playerid] = 2;
SetPlayerCriminal(playerid,255, "Pokusaj pljacke Opstine");
PlayerInfo[playerid][pRobTime] = 500;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Morate napustiti duznost");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Morate da imate oruzje da bi pljackali");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Niste u opstini");
}
return 1;
}
Again the same error
Re: Error's -
SoFahim - 28.08.2015
Please motion the lines numbers
Re: Error's -
Karlasx - 28.08.2015
Код:
41091 if(strcmp(cmd, "/opljackajopstinu", true) == 0)
41092 {
41093 new success = random(2);
41094 new popstinarobtime = PlayerInfo[playerid][pRobTime];
41095 if(CityHallRobbedRecently == 1)
41096 {
41097 SendClientMessage(playerid, COLOR_GREY, "Ova lokacija je vec bila opljackana, pokusajte kasnije");
41098 // return 1;
41099 }
41100 if(PlayerInfo[playerid][pRobTime] >= 1)
41101 {
41102 format(string, sizeof(string),"Skoro si pljackao, moras sacekati jos %d min da bi opet mogao da pljackas", (popstinarobtime / 60));
41103 SendClientMessage(playerid, COLOR_GREY, string);
41104 // return 1;
41105 }
41106 if(IsPlayerInRangeOfPoint(playerid, 2, 358.5919,184.2908,1008.3828))
41107 return 1;
41108 {
41109 if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40)
41110 {
41111 if(PlayerInfo[playerid][pDuty] == 0)
41112 {
41113 if(success == 1)
41114 {
41115 CityHallRobbedRecently = 1;
41116 new money = random(10000);
41117 SafeGivePlayerMoney(playerid, money);
41118 format(string, sizeof(string),"~w~Opljackali ste opstinu i uzeli ~g~%d$ !", money);
41119 GameTextForPlayer(playerid, string, 6000, 4);
41120 format(string, sizeof(string),"Opljackali ste opstinu i uzeli %d$ !",money);
41121 SendClientMessage(playerid, COLOR_GREY, string);
41122 format(string, sizeof(string), "{48E31C}[BW vanredne vesti] {ADADAD}Upravo je opljackana opstina");
41123 SendClientMessageToAll(COLOR_NICERED, string);
41124 WantedPoints[playerid] = 6;
41125 SetPlayerCriminal(playerid,255, "Pljacka Opstine");
41126 PlayerInfo[playerid][pRobTime] = 900;
41127 SetTimer("UnsetCityHallRob",1800000,false);
41128 OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
41129 }
41130 else
41131 {
41132 SendClientMessage(playerid, COLOR_ORANGE, "Niste uspeli opljackati Opstinu");
41133 WantedPoints[playerid] = 2;
41134 SetPlayerCriminal(playerid,255, "Pokusaj pljacke Opstine");
41135 PlayerInfo[playerid][pRobTime] = 500;
41136 }
41137 }
41138 else
41139 {
41140 SendClientMessage(playerid, COLOR_GREY, "Morate napustiti duznost");
41141 }
41142 }
41143 else
41144 {
41145 SendClientMessage(playerid, COLOR_GREY, "Morate da imate oruzje da bi pljackali");
41146 }
41147 }
41148 else
41149 {
41150 SendClientMessage(playerid, COLOR_GREY, "Niste u opstini");
41151 }
41152 return 1;
41153 }
Re: Error's -
Sew_Sumi - 28.08.2015
You need to clean up your code... That gives a headache to even try read it.
When pasting big code, use pastebin (Be sure to set it to expire in a week or 2), and again, I cannot stress how important formatting in your code is.
Another easy step is to actually ****** the error itself "error 029: invalid expression, assumed zero", You'll find the question has been brought up countless times.
Код:
if(IsPlayerInRangeOfPoint(playerid, 2, 358.5919,184.2908,1008.3828))
return 1;
{
That return 1 is totally not in the right spot.
There are other issues that you have, but they may be related to this as you were told before to remove them all, but you've missed this one and that may have caused the original.
Your other ones, they were probably fine.
Re: Error's -
Karlasx - 28.08.2015
+ rep for you two Thank you