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

Error Code BCE0034 expressions in statement must only be executed for their side-effects'

$
0
0
Okay I am trying To access the children of a gameobject and look in a Component to get a variable. That works fine. But I want to change the variable thats in the child object. Here is the Code. By the way Item.itemId and Item.amount are variables in a class. They are both ints. for (var child : Transform in transform) { if(child.GetComponent(InventoryObject).Item.itemId == 1002) { child.GetComponent(InventoryObject).Item.amount == 20; } } And then I get the error code BCE0034. Anyone got any ideas?

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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