SA-MP Forums Archive
Please help me fix this - 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: Please help me fix this (/showthread.php?tid=641297)



Please help me fix this - Fletcher007 - 13.09.2017

Pawno Crash cannot compilate
Код:
public OnObjectMoved(objectid) //return 1;
{
	if(objectid==objectswheel[0])
	{
		FerrisAngle ++;
		if(FerrisAngle>=360.0)
		{
			FerrisAngle=0.0;
		}
		if(FerrisAlternate)
		{
			FerrisAlternate=0;
		}
		else
		{
			FerrisAlternate=1;
		}
		new Float:FerrisWheelModZPos=0.0;
		if(FerrisAlternate)
		{
			FerrisWheelModZPos=0.05;
		}

  		MoveObject(objectswheel[0],1173.8949, -2004.6146,150.0+FerrisWheelModZPos,FERRIS_KOLESO_SPEED,0,FerrisAngle,0);

  		return 1;
  		}
  	}
}



Re: Please help me fix this - jlalt - 13.09.2017

You got an unnecessary close bracket. [ the } after return 1; ]

so codes gotta be ->

PHP код:
public OnObjectMoved(objectid//return 1;
{
    if(
objectid==objectswheel[0])
    {
        
FerrisAngle ++;
        if(
FerrisAngle>=360.0)
        {
            
FerrisAngle=0.0;
        }
        if(
FerrisAlternate)
        {
            
FerrisAlternate=0;
        }
        else
        {
            
FerrisAlternate=1;
        }
        new 
Float:FerrisWheelModZPos=0.0;
        if(
FerrisAlternate)
        {
            
FerrisWheelModZPos=0.05;
        }
          
MoveObject(objectswheel[0],1173.8949, -2004.6146,150.0+FerrisWheelModZPos,FERRIS_KOLESO_SPEED,0,FerrisAngle,0);
          return 
1;
      }




Re: Please help me fix this - Fletcher007 - 13.09.2017

Thank you