- Home /
How would i check something in an Element in an array?
I have this script and i just Don't get it working here is the script:
#pragma strict
import System.Collections.Generic;
var Inv : WeaponInfo[];
function Start ()
{
if (Inv.WeaponInfo[0] name == AKS74U)
}
function Update () {
}
Comment
Best Answer
Answer by perchik · Sep 02, 2013 at 03:31 PM
It seems like you're struggling pretty bad with syntax here. Maybe check out some programming tutorials.
In any case, based on your previous question, it should be
if(Inv[0].name == "AKS74U")