Closed dmathijs closed 1 year ago
attempt to index global 'iac' (a nil value)
This likely means you're trying to 1) run it using a platform that doesn't support it, or 2) running a vanilla engine.
The iac
module is currently only supported on iOS and Android.
In your case, I suspect you're running it on a desktop platform?
You can check for the availability at runtime like so:
if iac then
... do stuff with iac
end
Thank you, that makes a lot of sense. I wasn't aware that running it in the desktop version would throw this error. Would you like me to open a PR with an addition to the docs to note this, or is it intrinsically implied?
I think there's no need, as it's implied as you mention, since many of these platform specific extensions simply doesn't work on the "wrong platform".
Checking for nil
is our recommended way of checking for availability.
Hey,
I'm currently trying out defold & lua for the first time. I'm planning on building a project and wanted to give defold a try. Before doing anything I wanted to validate that I could get IAC working. However, as a total noob, I can't get it to work although I feel like I've followed the docs.
Currently I've imported the zip as a dependency and it shows up in my Asset tree, when I set the main.script code to
I get an exception
Again, this is probably because I am a starter but could anyone give me a pointer how to get this working? I would also like to update the documentation so that it is a little friendlier to other starters like me.