EAZYJ Posted January 28, 2019 Share Posted January 28, 2019 Hi, quick question: I made a dice game and I can't compare two variables to see if the player has chosen the right one. When I compile it says "Incorrect expression [email protected] == [email protected] One of the variables has unknown type, or operands are incompatible." :MISSION2_2_9 wait 0 if [email protected] == [email protected] jf @MISSION2_2_10 [email protected] is the number selected by the player. [email protected] is the random number the dice landed on. How come, and what could be the solution please? Thanks for help. Link to comment Share on other sites More sharing options...
OrionSR Posted January 28, 2019 Share Posted January 28, 2019 (edited) Search through the opcodes until you find the one specific to comparing two local variables of the type you are using. Sanny can't tell if you are comparing floating point values or integers. Include the full opcode version of the code. 003B: [email protected] == [email protected] // (int) 0045: [email protected] == [email protected] // (float) Edited January 28, 2019 by OrionSR Link to comment Share on other sites More sharing options...
EAZYJ Posted January 28, 2019 Author Share Posted January 28, 2019 Thanks Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted January 31, 2019 Share Posted January 31, 2019 VAR 9@ : Int 10@ : Int END IF 9@ == 10@ THEN ... Sanmodder 1 Link to comment Share on other sites More sharing options...