Home AMX User Forum AMX General Discussion

Duplicate Case Error, Complier acting weird

Facing a unique compiler error
ERROR:\Bedroom\incHVAC.axi(2043): C10576: Duplicate CASE values in SWITCH statement
, even though the case are all unique, its on line no 2043, there is a case 75 even though there is no other case 75


I got on call with support and they told me to put the cases on the top, and it is a bug in the compiler. Basically i have to put the cases in numerical order in order to work around it.

Has anyone ever faced this error.

Comments

  • AuserAuser Posts: 506
    I haven't personally run into it with my code, but I have seen a workmate run into it. I have also run into some even more arcane run time issues with switch cases too.
  • Spire_JeffSpire_Jeff Posts: 1,917
    I vaguely recall having this problem a few years ago, but I don't recall exactly how it presented. I do remember very vividly that putting the cases in numerical order fixed the problem. I always try to do this to this day, even though I don't recall exactly why :)

    Jeff
Sign In or Register to comment.