The if/else if format runs fine, the switch crashes verge:
string ActionString(int action)
{
if (action == CMBT_MOVE) return "Move";
else if (action == CMBT_UP) return "Up";
else if (action == CMBT_DOWN) return "Down";
else if (action == CMBT_LEFT) return "Left";
else if (action == CMBT_RIGHT) return "Right";
else if (action == CMBT_WAIT) return "Wait";
else if (action == CMBT_WSHORT) return "Short";
else if (action == CMBT_WLONG) return "Long";
else if (action == CMBT_ATTACK) return "Attack";
/*switch (action)
{
case CMBT_MOVE: return "Move";
case CMBT_UP: return "Up";
case CMBT_DOWN: return "Down";
case CMBT_LEFT: return "Left";
case CMBT_RIGHT: return "Right";
case CMBT_WAIT: return "Wait";
case CMBT_WSHORT: return "Short";
case CMBT_WLONG: return "Long";
case CMBT_ATTACK: return "Attack";
}*/
return "ERROR!";
}
That is all.
Zip