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

Wrong with script

$
0
0
I don't know how to fix this issue. Assets/skripts/EnemyHealth.js(18,13): BCE0020: An instance of type 'moneySystem' is required to access non static member 'money'. and this is my codes: #pragma strict var Health = 100; function ApplyDammage (TheDammage : int) { Health -= TheDammage; if(Health <= 0) { Dead(); } } function Dead() { Destroy (gameObject); moneySystem.money += 100;//name of your script moneySystem } That is the enemy health script var money : int = 1000;//amout of your money var moneyText : GUIText;//To Display Your money function Update() { if(money < 0) { money = 0; } } And that is the moneySystem script How do I fix this?

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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