Script not executing completely.
#1

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...
Reply
#2

Use print no SendClientMessage for debugs.
Reply
#3

yes, ok....but thats not the problem here. I want the script to run completely and not terminate at SetPVarInt(id,"player",playerid);
Reply
#4

Use print and see if it still stops the same
Reply
#5

Problem got fixed after a server restart. Thankyou!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)