Jump to content
  • Advertisement
Sign in to follow this  

i got a small peice of beginner JS script and getting a build error, need some help

This topic is 2364 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

function Update ()
var ammoBoxInt : int = 10;
var ammoBoxFloat : float = 5.567;
var ammoBoxString : String = "amoBox";
var ammoBoxBoolean : boolean = true;

print (ammoBoxInt);

var inventory = Array ("spellBook", 23, 10.56,"ammo");
print (inventory);
var inventoryBooks = inventory(0);

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 :P thanks guys!

Share this post

Link to post
Share on other sites
What ide/browser do you use?

All have consoles that outputs any error,
Chrome has "Developer Tools" Shift+Alt+I
Firefox has an excellent ad-don FireBug.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!