In my game I have a line of code that is getting my PlayerController script, and setting it to a private variable, playerhealth. Next it should set it to a text element, but it doesn't. This is the error I get:
![alt text][1]
This is the code on the line it says:
playerHealth = gameObject.GetComponent().PlayerHealth;
I also get another error saying that it cannot convert float to string (to set the text), I also do not know how to resolve this.
I have no idea on what this means and i have no idea what to do. I have tried to research this but got nothing. Here is a link to my whole code:
https://gist.github.com/avanti534/88d0d956e014b9fbb4d4
Here is a image that may help:
![alt text][2]
[1]: /storage/temp/66612-screenshot-2016-03-24-154826.png
[2]: /storage/temp/66611-screenshot-2016-03-24-160325.png
↧