Author Topic: Script runs fine in oclua but doesn't work when packaged with Luna  (Read 3483 times)

0 Members and 1 Guest are viewing this topic.

Offline TheNlightenedOne

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 427
  • Rating: +16/-1
    • View Profile
My contest entry is working fine in oclua but when I package it with Luna it complains about an attempt to index upvalue [a table I'm using] (a nil value). And yes, said table is properly defined.
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Script runs fine in oclua but doesn't work when packaged with Luna
« Reply #1 on: March 29, 2013, 05:33:11 pm »
In another topic you're dealing with external variables from TI-Basic.
Is that related ?

Without any source code are any further information we cannot help you (I know it is for your contest and you may not paste the code).
Luna has been tester again and again and used again and again my numerous of users.
« Last Edit: March 29, 2013, 05:33:21 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline TheNlightenedOne

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 427
  • Rating: +16/-1
    • View Profile
Re: Script runs fine in oclua but doesn't work when packaged with Luna
« Reply #2 on: March 29, 2013, 05:36:50 pm »
I had to use a catalog function to randomize a set and store it in a Lua table (works fine), and this is the same table.
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Script runs fine in oclua but doesn't work when packaged with Luna
« Reply #3 on: March 30, 2013, 06:49:38 am »
Are you trying to call the first element as 0 perhaps (even though that should just return nil I think)? (probably not, but I caught myself doing this several times :P)
« Last Edit: March 30, 2013, 06:50:41 am by ElementCoder »

Some people need a high five in the face... with a chair.
~EC

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Script runs fine in oclua but doesn't work when packaged with Luna
« Reply #4 on: March 30, 2013, 01:10:03 pm »
I had to use a catalog function to randomize a set and store it in a Lua table (works fine), and this is the same table.
Why not use math.random? You can easily randomise a set that way.
Also, where somewhere do you randomise the set (in what event?). It might be the enviroment isn't properly loaded yet when it gets executed (with OCLua it's already loaded, because it executes the code a bit different).