It is currently Fri Jun 22, 2018 4:53 pm Advanced search

Java syntax query

Code won't compile? Found a bug? Post here!

Java syntax query

Postby DaveH6 » Sat Oct 30, 2010 1:21 pm

Hi All, I'm new to java - we have a planet array that holds 6 pieces of information for each planet, can I extend that to hold a few more items that I calculate myself? I'd like to add 3 items that I calculate once only on the first turn and 3 that I recalculate every turn. Each extra item will be int. Any help appreciated.
DaveH6
Cadet
 
Posts: 1
Joined: Fri Oct 22, 2010 9:31 pm

Re: Java syntax query

Postby Demerzel » Sat Oct 30, 2010 5:52 pm

if you're asking how to declare fields in a class just read this (or probably the whole page really): http://en.wikipedia.org/wiki/Java_syntax#Declaration

if you've already done it and are having issues iirc the planet classes are destroyed and recreated each turn in the starter pack ( i could be wrong )
Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail


Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron