Original Post
function Update ()
{
/*
var ammoBoxInt : int = 10;
var ammoBoxFloat : float = 5.567;
var ammoBoxString : String = "amoBox";
var ammoBoxBoolean : boolean = true;
print (ammoBoxInt);
print(ammoBoxFloat);
print(ammoBoxString);
print(ammoBoxBoolean);
*/
var inventory = Array ("spellBook", 23, 10.56,"ammo");
print (inventory);
var inventoryBooks = inventory(0);
print(inventoryBooks);
}
aight heres my code, the top part is commented out just for current teaching reasons for my self. the bottom part gets an error at line var inventoryBooks = inventory(0); not sure why i cant print out that part of an array, i just did as the tutoriol said and iv changed it a thousand times and i cant seem to figure it out!
any help please thanks guys!
{
/*
var ammoBoxInt : int = 10;
var ammoBoxFloat : float = 5.567;
var ammoBoxString : String = "amoBox";
var ammoBoxBoolean : boolean = true;
print (ammoBoxInt);
print(ammoBoxFloat);
print(ammoBoxString);
print(ammoBoxBoolean);
*/
var inventory = Array ("spellBook", 23, 10.56,"ammo");
print (inventory);
var inventoryBooks = inventory(0);
print(inventoryBooks);
}
aight heres my code, the top part is commented out just for current teaching reasons for my self. the bottom part gets an error at line var inventoryBooks = inventory(0); not sure why i cant print out that part of an array, i just did as the tutoriol said and iv changed it a thousand times and i cant seem to figure it out!
any help please thanks guys!