[Warnings] Please Help..
#1

warning 217: loose indentation
warning 209: function "OnObjectMoved" should return a value

Код:
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; 
    } 
}
Reply
#2

Please for godsake, indent your code.

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
    }
    return 
0;

Reply
#3

Wow, Thank u its working
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)