Hi James,
When I compiled ST EXP, I noticed the following warning :
Probably, the last return statement is misplaced -- it should be between the last and the 2nd last closing brackets, right?
The text of the last returns says "Field is owned by another player". This wold be a missleading return for the outermost {}. It should sound like "Invalid coordidate beyond world bounds" or similar.
In which case, I suspect that the code is superfluous in any event - deleting fields is now allowed unless the number of fields is at or below the minimum, in which case a special error message appears notifying the player of the fact. So this error message seems to be a remnant of an earlier time (and therefore an issue from Simutrans-Standard rather than Simutrans-Experimental).
I didn't have time to study the code. What I want to point out is only that, all control paths should return something valid. :)