Robotc Code Help POE

I’m a Freshmen in POE, and I have a task to create a crane that moves and lowers a basket and stops.

"A construction contractor needs your team to design a crane that can rotate 90 degrees and lower a basket 18 inches for supplies to be moved around the job site. The crane should be run with a series of buttons and switches that can activate the rotation, lowering, and raising of the basket. The device must also be able to be started and stopped (emergency) by using a switch. "

As of now this is the code that I have came up with,

#pragma config(Sensor, dgtl1,  bumpSwitchstart, sensorTouch)
#pragma config(Sensor, dgtl2,  bumpSwitchstop, sensorTouch)
#pragma config(Sensor, dgtl3,  limitSwitchdrop, sensorTouch)
#pragma config(Sensor, dgtl4,  limitSwitchup,  sensorTouch)
#pragma config(Motor,  port1,           craneMotor,    tmotorVex393_HBridge, openLoop)
#pragma config(Motor,  port9,           craneServo,    tmotorServoStandard, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task estop()
{
	while(true)
	{
		if(SensorValue(estopsensor) <500)
		{
			stopAllTasks();
		}
		wait1Msec(10);
	}
}


task main()
{
	startTask(estop);
	while(true)
	{
		if(SensorValue(bumpSwitchstart)==1)
		{
			setServo(craneServo, 90);
		}
		if(SensorValue(bumpSwitchstop)==1)
		{
			setServo(craneServo, -90);
		}
		if(SensorValue(limitSwitchdrop)==1)
		{
			startMotor(craneMotor, 1);
			wait(18);
			stopMotor(craneMotor);
		}
		if(SensorValue(limitSwitchup)==1)
		{
			startMotor(craneMotor, -1);
			wait(18);
			stopMotor(craneMotor);
		}
	}
}

I need help too see if this will actually work, and if it doesn’t what I can do to fix it. Since I do not have a cortex at my house.

Thanks.

You posted in an IQ forum but referenced the cortex which is EDR. Which platform are you using ?

Thats my bad, honestly im not good with this stuff and im really new so when you say “platform” i dont know what you mean, so Im going to assume the platform i use it the cortex or something like that?

Ok, so this is VexIQ
4-radio_1_4

and this is what in generally know as the cortex.
cortex-microcontroller

so you are trying to use the second one ?

Yes, the 2nd one is the one im using.