SA-MP Forums Archive
Apple Job Error - 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: Apple Job Error (/showthread.php?tid=627448)



Apple Job Error - Pagle - 28.01.2017

if(PRESSED(KEY_WALK) && vashlijob[playerid] == 1 && GraffityStop[playerid] == 0)
{
if( (GetTickCount() - GetPVarInt(playerid, "pLayerLastTick") < 770)
for(new i = 0; i < 15; i++) // error 001: expected token: ")", but found "for"
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, ObjectTree[i][0],ObjectTree[i][1],ObjectTree[i][2]+(128.6059-124.36917)))
{
if(gTreeStatus[i] == false)
{
SendClientMessage(playerid, -1, "» Am Xeze Vashli Agaraa");
ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1 ,1,0,1);
}
else
{
SetPVarInt(playerid,"MinerCount1",GetPVarInt(playe rid,"MinerCount1")+1);
if(GetPVarInt(playerid,"MinerCount1") >= 7)
{
GraffityStop[playerid] = 1;
if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid,0);
SetPlayerAttachedObject(playerid,0,1356,1,0.050000 ,0.445000,0.013999,2.099995,91.099983,0.000000,0.5 83999,0.672000,0.864999);
SetPlayerAttachedObject(playerid,1,19060,1,0.07899 9,0.558999,-0.142000,0.000000,0.000000,-5.599999,0.143999,0.191000,0.153000);
SetPlayerAttachedObject(playerid,2,19060,1,0.03400 0,0.504000,0.046999,0.000000,0.000000,0.000000,0.1 64999,0.203999,0.150000);
SetPlayerAttachedObject(playerid,3,19060,1,0.00299 9,0.345999,-0.046000,0.000000,0.000000,141.799926,0.203000,0.1 32000,0.155999);
SetPlayerAttachedObject(playerid,4,19060,1,0.03100 0,0.353999,0.173999,0.000000,0.000000,0.000000,0.2 00999,0.154999,0.169999);
SetPlayerAttachedObject(playerid,5,19060,1,-0.019999,0.563000,0.232999,0.000000,0.000000,0.000 000,0.267000,0.189999,0.209999);
ClearAnimations(playerid);
ApplyAnimation(playerid,"CARRY","liftup",1.0,0,1,1 ,0,0,1);
SetTimerEx("CarryDelay",1000,false,"i",playerid);
SetPlayerCheckpoint(playerid, 513.2117,1115.9957,14.9970, 1.4);
DeletePVar(playerid, "MinerCount1");
SendClientMessage(playerid, COLOR_RED, "» ~r~Kalata Savsea Sheitanet Sawyobshi");
//displayCenterHUDInfo(playerid, "~r~Kalata Savsea~w~ Miitanet Magidastan..", ;
}
if(GetPVarInt(playerid, "MinerCount1") > 0)
{
ApplyAnimation(playerid,"SILENCED","Silence_fire", 4.1,0,1,1,15,0);
mes = "";
format(mes, sizeof(mes),"%d/7", GetPVarInt(playerid, "MinerCount1"));
GameTextForPlayer(playerid, mes, 2000, 3);
GetPVarInt(playerid, "pLayerLastTick") = GetTickCount() // error 022: must be lvalue (non-constant)
if(gTreeHealth[i] > 0) // error 001: expected token: ";", but found "if"
{
gTreeHealth[i] -= 10;
return 1;
}
else
{
SetTimerEx("CarryDelay",1000,false,"i",playerid);
SetTimerEx("TreeVost",25000,false,"i", i);
gTreeStatus[i] = false;
gTreeHealth[i] = 0;
DestroyDynamicObject(gTree[i]);
gTree[i] = CreateDynamicObject(775, ObjectTree[i][0], ObjectTree[i][1], ObjectTree[i][2], 0.00000, 0.00000, 360.0000);
DestroyDynamicCP(gTreeCP[i]);
SendClientMessage(playerid, COLOR_RED, "» Xeze Vashli Agar Aris.");
SetPlayerSpecialAction(playerid ,SPECIAL_ACTION_NONE);
ApplyAnimation(playerid,"PED","IDLE_tired",4.1,0,1 ,1,0,1);
return 1;
}
}
}
}
}
return 1;
}

please help me


Re: Apple Job Error - Codeah - 28.01.2017

Please.



Also specify the problem. Nobody is going to help you if you pour code on them.


Re: Apple Job Error - Pagle - 28.01.2017

1) for(new i = 0; i < 15; i++) // error 001: expected token: ")", but found "for"
2) if(gTreeHealth[i] > 0) // error 001: expected token: ";", but found "if"
3) GetPVarInt(playerid, "pLayerLastTick") = GetTickCount() // error 022: must be lvalue (non-constant)


Re: Apple Job Error - Sew_Sumi - 28.01.2017

1st error, is you've got too many braces ( ( ) ) in the line above.

2nd, missing ; on the previous line.

3rd error I'm unsure, but it seems to do with how that variable is made.


Re: Apple Job Error - Pagle - 28.01.2017

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
1st error, is you've got too many braces ( ( ) ) in the line above.

2nd, missing ; on the previous line.

3rd error I'm unsure, but it seems to do with how that variable is made.
Correct me if you can, and has given me the code to retrieve


Re: Apple Job Error - Sew_Sumi - 28.01.2017

Just look at what it is, the first one is unmatched ( )s.

Second is you're missing the ; at the end of the line.