Using LunaTester Causes onStart to be Skipped in APIs

Description: It's archive, posting new is here http://wohlsoft.ru/forum/viewforum.php?f=11

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 22
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #1by Sambo » 29 Oct 2016, 5:51

Apparently, functions that run in onStart are skipped in APIs if you launch using LunaTester. Here is my test:

Code: Select all

function onStart()
   i = 0
   assert(false, "Function not skipped")
end

function onDraw()
   Text.print("Value: " .. i)
end


It should give me the error, "Function not skipped," right?
Well, It actually gives me the error, "Attempt to concatenate global 'i' (a nil value)."

This only happens to APIs. How do I know? I called the API I was testing from onStart.
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 27
Reputation: 392
Posts: 1449
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #2by Wohlstand » 29 Oct 2016, 8:11

This bug is seems on LunaLUA side or some is bad in the LunaLauncher code. I'll just forward this to Rednaxela


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest