I got this error in unity > Assets/Resources/NewScripts/WeaponManager.js(163,37): BCE0019: 'active' is not a member of 'SniperScarenewScript'.
Here's my code
----------
//for sniper2005
if (weaponToSelect == 2 && zooming) {
var SniperZoomin : SniperScarenewScript = weaponsInGame[2].gameObject.transform.GetComponent("SniperScarenewScript");
if(SniperZoomin.active){
SniperZoomin.sniperzoomin();
zooming = false;
}
}
else
{
var SniperZoomout : SniperScarenewScript = weaponsInGame[2].gameObject.transform.GetComponent("SniperScarenewScript");
if(SniperZoomout.active){
SniperZoomout.sniperzoomout();
zooming = true;
}
How to fix this error?
↧