Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: Augs on September 03, 2012, 07:00:51 am
-
I have some experience with programming and would like to write my own programs for the calc. I understand the basics of C# and understand basic. I have looked into it and it looks like lua is the best option. I am currently running on os 3.1(because of ndless). How can I get lua programs on my calc?
EDIT: Please post only once in the correct category. Thanks! :) -alberthrocks [Topics Merged]
-
Augs, there is no need to create a new topic if someone doesn't reply qucikly .. just be patient.
Anyway, you can create Lua documents multiple ways.
The most easy is to use the SDK provided with the student software 3.2.
If you don't have that, there are two other options:
Use OClua, to program oncalc.
Use the editor of your choice, and compile the program using Luna. Then send the resulting document to your calculator.
Tutorials: http://www.inspired-lua.org/2012/01/starting-in-lua/
Luna: http://www.ticalc.org/archives/files/fileinfo/441/44113.html
OClua: http://www.ticalc.org/archives/files/fileinfo/440/44075.html
Hope this helps.
-
Merged topics. (from http://ourl.ca/16942/315691)
This is the correct category to post Lua stuff! :D
-
Augs, there is no need to create a new topic if someone doesn't reply qucikly .. just be patient.
Anyway, you can create Lua documents multiple ways.
The most easy is to use the SDK provided with the student software 3.2.
If you don't have that, there are two other options:
Use OClua, to program oncalc.
Use the editor of your choice, and compile the program using Luna. Then send the resulting document to your calculator.
Tutorials: http://www.inspired-lua.org/2012/01/starting-in-lua/
Luna: http://www.ticalc.org/archives/files/fileinfo/441/44113.html
OClua: http://www.ticalc.org/archives/files/fileinfo/440/44075.html
Hope this helps.
Thanks I will go with luna. The tutorial you sent me was with oclua.
-
BTW, you can still use the OS 3.1 on your device and have the Computer Software 3.2, in which you have the Lua SDK.
(and for lua scripts only, it should work well enough with OS 3.1 when you put " platform.apilevel = '1.0' " at the beginning.
-
BTW, you can still use the OS 3.1 on your device and have the Computer Software 3.2, in which you have the Lua SDK.
(and for lua scripts only, it should work well enough with OS 3.1 when you put " platform.apilevel = '1.0' " at the beginning.
thanks
-
BTW, you can still use the OS 3.1 on your device and have the Computer Software 3.2, in which you have the Lua SDK.
(and for lua scripts only, it should work well enough with OS 3.1 when you put " platform.apilevel = '1.0' " at the beginning.
Having some trouble, it says the syntax is wrong. http://i.imgur.com/KLVZQ.png
-
I meant in a Lua program, not basic ;-)
Computer software -> Insert -> Lua Editor -> Insert Script
-
I meant in a Lua program, not basic ;-)
Computer software -> Insert -> Lua Editor -> Insert Script
Sorry, I am new to nspire programming.Is it this? http://i.imgur.com/O0iTv.png
-
Yes, this one :)
Now you can follow the tutorials and have fun :)
(but only you will be able to transfer 3.1 compatible scripts by having only made a lua script and nothing else before (not what you did)) and sertting the apilevel to 1
-
Are OS 3.1 scripts completely compatible with 3.2?
I know 3.0.x ones aren't.
I think also instead of Luna you can use the TI-nspire Scripting Tools, but I haven't actually tried it myself.
-
Are OS 3.1 scripts completely compatible with 3.2?
I know 3.0.x ones aren't.
I think also instead of Luna you can use the TI-nspire Scripting Tools, but I haven't actually tried it myself.
I believe they are if you state "platform.apilevel = "1.0" on the top of your script, but correct me if i'm wrong.
-
Sending a TNS of a lua application that was created with tools pre [3.2] will make the calculator run it in apiLevel 1.0 automatically.
However, if you copy the source and want to recompile it with the latest luna or the SDK you will need to add "platform.apilevel = '1.0' " (as ElementCoder mentioned) to the top of your script.
But, it is also perfectly possible that the script will run fine without adding that line.
So:
- all 3.0x, 3.1 TNS files containing Lua scripts created with Luna < v0.3 should run fine on 3.2 . It will automatically use the old API structure
- if you want to recompile, add "platform.apilevel = '1.0' " to the top of your script.
Or you could just script it so that it doesn't matter where you run it :)
-
They are supposed to be compatible, especially if you didn't use any non-documented/private APIs (for example gc:setAlpha, etc.)
-
Sending a TNS of a lua application that was created with tools pre [3.2] will make the calculator run it in apiLevel 1.0 automatically.
However, if you copy the source and want to recompile it with the latest luna or the SDK you will need to add "platform.apilevel = '1.0' " (as ElementCoder mentioned) to the top of your script.
But, it is also perfectly possible that the script will run fine without adding that line.
So:
- all 3.0x, 3.1 TNS files containing Lua scripts created with Luna < v0.3 should run fine on 3.2 . It will automatically use the old API structure
- if you want to recompile, add "platform.apilevel = '1.0' " to the top of your script.
Or you could just script it so that it doesn't matter where you run it :)
I remember when Lua first came out (and probably before Luna) it was compiled sort of manually with a Problem1.xml file separate inside the .tns. The original 15Puzzle for Lua is an example. You had to make some slight changes to the code and convert it to .lua using luna to make it compatible. Other than that, it seems that Lua files from 3.0.x are compatible from what I see, unless you use functions that have been removed such as print(.