Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Error CS0019 operand cannot be applied

$
0
0
Hello folks! In a class I want to see a number, which is private in a different class (and changes due to player input) is a specific number. so I wrote: from the original class Player2Script: private int modelNumber1; public static int getModelNumber1() { return modelNumber1; } the comparison happens here: if (other.tag == "Player_1" && Player2Script.getModelNumber1 == 1) { something something something } Now I get the error message: error CS0019: Operatot '==' cannot be applied to operands of type 'method group' and 'int' I have the feeling I am missing something obvious, but can't get my head around it. Thanks for your help!

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>