SA-MP Forums Archive
error 029: invalid expression, assumed zero - 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 029: invalid expression, assumed zero (/showthread.php?tid=578836)



error 029: invalid expression, assumed zero - Vaki - 22.06.2015

(8229) : error 029: invalid expression, assumed zero

Script :
Quote:

forward UnsetKucaRob();
public UnsetKucaRob()
{
KucaRobbedRecently = 0;
return 1;
}
forward RobKuca(playerid);
public RobKuca(playerid)
{
new string[128];
for(new i = 0; i < sizeof(KucaInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
{
if(KucaRobbingTime[playerid] > 0)
{
KucaRobbingTime[playerid] --;
format(string, sizeof(string),"~w~Ostanite kod vrata te kuce jos ~r~%d ~w~sekundi !", KucaRobbingTime[playerid]);
GameTextForPlayer(playerid, string, 1000, 4);
}
else
{
KillTimer(RobKucaTimer);
KucaRobbingTime[playerid] = 0;
SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
SetPlayerInterior(playerid, KucaInfo[i][kInt]);
SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
format(string,sizeof(string),"Lopov %s razvaljuje vrata od kuce i hitro ulazi u nju!",GetName(playerid));
ProxDetector(10.0, playerid, string,PROX,PROX,PROX,PROX,PROX);
}
}
}
else ////////////////////////////////////////////////////////// 8229 this line
{
format(string, sizeof(string),""ORANGE"INFO:"BELA"Otisli ste sa pickupa i provaljivanje vam se prekinulo!");
KucaRobbingTime[playerid] = 0;
KillTimer(RobKucaTimer);
}
return 1;
}

Please help, tnx


Re: error 029: invalid expression, assumed zero - PeterJane - 22.06.2015

Quote:
Originally Posted by Vaki
Посмотреть сообщение
(8229) : error 029: invalid expression, assumed zero

Script :
Please help, tnx
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    //
}
else
{
    //
}
You added an else to the loop, which caused the following error:

029: invalid expression, assumed zero


Re: error 029: invalid expression, assumed zero - kyriakos587 - 22.06.2015

Which is the 8229 line so we can help you


Re: error 029: invalid expression, assumed zero - Vaki - 22.06.2015

You got on down of text


Re: error 029: invalid expression, assumed zero - PeterJane - 22.06.2015

Quote:
Originally Posted by Vaki
Посмотреть сообщение
You got on down of text
I already gave you the answer. Please check my comment.


Re: error 029: invalid expression, assumed zero - UltraScripter - 22.06.2015

try this
pawn Код:
forward UnsetKucaRob();
public UnsetKucaRob()
{
KucaRobbedRecently = 0;
return 1;
}
forward RobKuca(playerid);
public RobKuca(playerid)
{
new string[128];
for(new i = 0; i < sizeof(KucaInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
{
if(KucaRobbingTime[playerid] > 0)
{
KucaRobbingTime[playerid] --;
format(string, sizeof(string),"~w~Ostanite kod vrata te kuce jos ~r~%d ~w~sekundi !", KucaRobbingTime[playerid]);
GameTextForPlayer(playerid, string, 1000, 4);
}
}
}
else
{
KillTimer(RobKucaTimer);
KucaRobbingTime[playerid] = 0;
SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
SetPlayerInterior(playerid, KucaInfo[i][kInt]);
SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
format(string,sizeof(string),"Lopov %s razvaljuje vrata od kuce i hitro ulazi u nju!",GetName(playerid));
ProxDetector(10.0, playerid, string,PROX,PROX,PROX,PROX,PROX);
}
else ////////////////////////////////////////////////////////// 8229 this line
{
format(string, sizeof(string),""ORANGE"INFO:"BELA"Otisli ste sa pickupa i provaljivanje vam se prekinulo!");
KucaRobbingTime[playerid] = 0;
KillTimer(RobKucaTimer);
}
return 1;
}



Re: error 029: invalid expression, assumed zero - Vaki - 22.06.2015

Peter is good but i cant do that how he think i can because i try something new but tnx all for help