Script not executing completely. - 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: Script not executing completely. (
/showthread.php?tid=645752)
Script not executing completely. -
Primes007 - 03.12.2017
Ok here is the part of a code:
PHP код:
else
{
SendClientMessage(playerid,grey,"3");
GetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
if(IsPlayerInRangeOfPoint(playerid,15.0,Pos[0],Pos[1],Pos[2]))
{
SendClientMessage(playerid,grey,"4");
SetPVarInt(id,"player",playerid);
SendClientMessage(playerid,grey,"5");
SetPVarInt(id,"id",playerid);
SendClientMessage(playerid,grey,"6");
SetPVarInt(id,"n",n);
SendClientMessage(playerid,grey,"7");
SetPVarInt(id,"cost",cost);
SendClientMessage(playerid,grey,"8");
The script doesn't execute the part after a variable assignment happens (SetPVar or a=2)
I have used SendClientMessages after each significant steps to debug the problem.
When I execute this code in-game, the numbers print upto 4. The code after that is not being run.
Please help...
Re: Script not executing completely. -
OneDay - 03.12.2017
Use print no SendClientMessage for debugs.
Re: Script not executing completely. -
Primes007 - 03.12.2017
yes, ok....but thats not the problem here. I want the script to run completely and not terminate at
SetPVarInt(id,"player",playerid);
Re: Script not executing completely. -
OneDay - 03.12.2017
Use print and see if it still stops the same
Re: Script not executing completely. -
Primes007 - 03.12.2017
Problem got fixed after a server restart. Thankyou!