Checking if object coordinates equal to certain coordinates
#1

Hi all,

I need to check if the objects coordinates are equal to a certain set of coordinates. However, it's not working for some reason. Code and error are below:

Code:
if(GetObjectPos(leftSdDoor, x, y, z) == 244.88681, 72.58778, 1002.63953){
	        //Doors closed
	        MoveObject(leftSdDoor, 243.9668, 72.5878, 1002.6395, 2.00);
	    	MoveObject(rightSdDoor, 248.8093, 72.5921, 1002.6395, 2.00);
		}else{
		    //Doors Open
		    MoveObject(leftSdDoor, 244.8868, 72.5878, 1002.6395, 2.00);
	    	MoveObject(rightSdDoor, 247.8693, 72.5921, 1002.6395, 2.00);
		}
Sorry if the indentations have gone messed up

Error (Warning): C:\Users\Rhys\Desktop\scripting\gamemodes\sheriffs .pwn(374) : warning 206: redundant test: constant expression is non-zero

Thanks in advance if you can help!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)