Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ElementCoder

Pages: 1 ... 24 25 [26] 27 28 ... 46
376
TI-BASIC / Re: Another Question TI-Nspire basic
« on: January 25, 2013, 04:32:12 pm »
Yes, int() cuts off any decimals (converts it to an Integer).
More importantly it rounds down
int(9.57)=9
int(-9.57)=-10
But the nspire literally cuts off the decimals and leaves the dot (.) in place.
Well if you were worried about that you could give int(9.57)->approxFraction(5.E-14)
That's very  useful! And yeah, the rounding down is also important indeed.

377
TI-BASIC / Re: Another Question TI-Nspire basic
« on: January 25, 2013, 04:26:37 pm »
Yes, int() cuts off any decimals (converts it to an Integer). But the nspire literally cuts off the decimals and leaves the dot (.) in place.

378
TI-BASIC / Re: Another Question TI-Nspire basic
« on: January 25, 2013, 04:22:55 pm »
The nspire has an 'int()' command for that. But you have to be careful int(9.57) gives back 9.  WITH the dot, which can be problematic with comparing sometimes.

379
Computer Programming / Re: Nullpointer exception
« on: January 25, 2013, 03:58:27 pm »
I see. Any suggestions on how to make it change the value?

380
Computer Programming / Nullpointer exception
« on: January 25, 2013, 03:37:04 pm »
I have the following arrays:
Code: [Select]
JTextArea foxBA, foxMA, foxBP, foxMLS;
JTextArea[] textFox = {foxBA, foxMA, foxBP, foxMLS};
String[] label = {"Breeding Age: ", "Max Age: ", "Breeding Probability: ", "Max Litter Size: "};
I initialize them by doing:
Code: [Select]
for(int i = 0; i < textFox.length; i++){
tab2_fox.add(new JLabel(label[i]));
textFox[i] = new JTextArea(1, 5);
textFox[i].setText(Fox.getData().get(i).toString());
tab2_fox.add(textFox[i]);
}
However, when trying to get the text by doing
Code: [Select]
foxBA.getText() I get a NullPointerException. But when doing
Code: [Select]
textFox[0].getText() everything works fine. Why can't I acces the actual object, but can I acces it by using its array reference?

381
TI-BASIC / Re: Need help
« on: January 25, 2013, 03:03:37 pm »
With request is the same way :) And for new questions you should just post again. That way we can see you have a new question, plus now it looks like my answer comes out of nowhere. Don't use edit to delete you entire previous question, just ask again :)

382
TI-BASIC / Re: Need help
« on: January 25, 2013, 10:03:23 am »
You have to use the string concatenation operator:
Code: [Select]
Text "I have "&string(x)&" peanuts"
If x is a string you can leave out the 'string()' command. If x is a non string value, you have to stringify it first using 'string(argument)'.

383
Other / Re: The WiiU is powerful
« on: January 25, 2013, 05:09:25 am »
Nintendo has The Legend of Zelda, so they win anyways :P
Wait until the novelty wears off. Then what? Ooooh make different games :P Diversity always wins.
TLoZ never gets boring :P Look at how many games there are.

384
TI-BASIC / Re: Need help
« on: January 24, 2013, 11:02:25 am »
If you want to make an RPG you should most definitely look at TI RPG and TI RPG 2 both by Superbany, especially the latter is extremely well made.

385
TI-BASIC / Re: Need help
« on: January 24, 2013, 10:57:30 am »
I have just decided to pick up my "book-that-never-came-further-than-title-page" about Nspire BASIC, I should have a chapter or two done by the end of the week, though that probably won't be of help for you, Ch.1 will be about the editor and it's functionality and Ch.2 will be the hello world :)

386
TI-BASIC / Re: Need help
« on: January 24, 2013, 10:53:01 am »
...I think there's a way to make it so you'll only need to define a program once and not everytime you use a new document...
There is, you'd have to make your program LibPriv or LibPub. LibPub will make it show up in the catalog, LibPriv means it won't. This can be set in the program editor by going to menu>1: Actions>7: Change Library Acces. You'd then access it by calling <libraryname>\function()

Yeah running a program that isn't there won't do much :P though that should have given you an error "Function not defined" (or you must mean you gave it no body).

387
TI-BASIC / Re: Need help
« on: January 24, 2013, 10:10:38 am »
Well than you can't find that indeed :P Homer gave instructions for the TI84 series (which is assumed if you say "TI BASIC"). For Nspire, you just call a program by typing its name. example:
Code: [Select]
Define example()=
Prgm
anotherprogram()
EndPrgm

388
Other / Re: The WiiU is powerful
« on: January 24, 2013, 10:08:17 am »
What kind of touch screen  does this have?
I don't know exactly but it is a single-touch screen.

That reminds me, I hope that Nintendo didn't make the new hardware too hard to code either...
From what I understood it's similar to the Wii, the main point is that physics stuff and heavy math should be done by the GPU and not the CPU.

389
Other / The WiiU is powerful
« on: January 23, 2013, 03:11:12 pm »
There may be some discussion about how powerful the WiiU really is. Like the tile says it is, in its own way.

http://www.zeldainformer.com/news/comments/developers-have-it-wrong-the-wii-u-is-powerful-its-just-next-generation-pow

390
Lua / Re: Updating WZGUILib
« on: January 22, 2013, 04:16:34 am »
I'm very happy you keep developing this! I'm finally able to do some work on projects again so this is an excellent time to play around with this :D :thumbsup: for your hard work.

Pages: 1 ... 24 25 [26] 27 28 ... 46