<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Been searching and trying to figure out a comparison problem.<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">func</span><span style="font-variant-ligatures: no-common-ligatures" class=""> ==(lhs : </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">ACType</span><span style="font-variant-ligatures: no-common-ligatures" class="">, rhs : </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">ACType</span><span style="font-variant-ligatures: no-common-ligatures" class="">) -> </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Bool</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">switch</span><span style="font-variant-ligatures: no-common-ligatures" class=""> (lhs,rhs) {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> (.</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">other</span><span style="font-variant-ligatures: no-common-ligatures" class="">, .</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">other</span><span style="font-variant-ligatures: no-common-ligatures" class="">):</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(148, 17, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">return</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">true</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> (.</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">other</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class="">):</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(148, 17, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">return</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">false</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">_</span><span style="font-variant-ligatures: no-common-ligatures" class="">, .</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">other</span><span style="font-variant-ligatures: no-common-ligatures" class="">):</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(148, 17, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">return</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">false</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(148, 17, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures" class="">default</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">return</span><span style="font-variant-ligatures: no-common-ligatures" class=""> lhs </span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">==</span><span style="font-variant-ligatures: no-common-ligatures" class=""> rhs</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">enum</span><span style="font-variant-ligatures: no-common-ligatures" class=""> ACType {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> noType</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> natural</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> armour</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> shield</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> deflection</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> dodge</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> sacred</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> luck</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>case</span><span style="font-variant-ligatures: no-common-ligatures" class=""> other(</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">String</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>static</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">func</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Stacks(type : </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">ACType</span><span style="font-variant-ligatures: no-common-ligatures" class="">) -> </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Bool</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #941100" class="">return</span><span style="font-variant-ligatures: no-common-ligatures" class=""> type </span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">==</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">ACType</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">noType</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">||</span><span style="font-variant-ligatures: no-common-ligatures" class=""> type </span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">==</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">ACType</span><span style="font-variant-ligatures: no-common-ligatures" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">dodge</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #ff2600" class="">||</span><span style="font-variant-ligatures: no-common-ligatures" class=""> type == </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">ACType</span><span style="font-variant-ligatures: no-common-ligatures" class="">.other</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">I get an error concerning ‘type == ACType.other’.</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 11px;" class=""><font face="Menlo" class="">Compiler blab: Binary operator '==' cannot be applied to operands of type 'ACType' and '(String) -> ACType'</font></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">How do I fix this? Simply cannot see it.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">TIA Mark</div></body></html>