The following function keeps returning the error message "This method must return a result of type int" and I cannot figure out why.

int

loaderResource( Plate agent ) {

if(agent.plateScale==SCALE25nm )

{if(loaders.get(0).isIdle)

return 0;

else

if(loaders.get(1).isIdle)

return 1;

else

if(loaders.get(2).isIdle)

return 2;

else

if(loaders.get(4).isIdle)

return 4;

else

if(loaders.get(5).isIdle)

return 5;

;}

else

if(agent.plateScale==SCALE200pm)

{if(loaders.get(3).isIdle)

return 3;

else

if(loaders.get(5).isIdle)

return 5;

;}

else

if(agent.plateScale==SCALE500pm)

{if(loaders.get(3).isIdle)

return 3;

else

if(loaders.get(5).isIdle)

return 5;}

else

if(agent.plateScale==SCALE100nm)

{if(loaders.get(4).isIdle)

return 4;}

;

}

Similar questions and discussions