iOS version and lua functions

All questions/issues/feedback for the iOS version of Wesnoth belong here.

Moderator: Forum Moderators

Post Reply
Ptitboul
Posts: 73
Joined: May 8th, 2021, 3:45 pm

iOS version and lua functions

Post by Ptitboul »

I looked for, and did not find a list of differences between the desktop and the iOS version.
For my campaign (named Bloodlust) I have defined an additional menu item (hotkey being shift-i) which uses some lua code defined in a "lua.lua" file.
This "lua.lua" file is loaded by "_main.cfg" by

Code: Select all

[lua]
    code = << wesnoth.dofile("~add-ons/Bloodlust/lua.lua") >>
[/lua]
The additional menu item is defined in an other file, loaded lated in "_main.cfg" by

Code: Select all

{~add-ons/BloodLust/weapons}
This works for the desktop versions, but for the iOS version I have an error message, which says that some lua function (which is defined in "lua.lua") "must be assigned before being used".

I don't know how to solve this issue.
My campaign, Bloodlust, is is need of feedback!
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: iOS version and lua functions

Post by Pentarctagon »

Currently the most recent desktop version is 1.16 while on iOS it's 1.14.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Ptitboul
Posts: 73
Joined: May 8th, 2021, 3:45 pm

Re: iOS version and lua functions

Post by Ptitboul »

My campaign is working on desktop versions 1.12, 1.14, 1.15 and 1.16.
I think that the problem is a difference between iOS and desktop, rather than caused by the version of Wesnoth.
My campaign, Bloodlust, is is need of feedback!
Ptitboul
Posts: 73
Joined: May 8th, 2021, 3:45 pm

Re: iOS version and lua functions

Post by Ptitboul »

I have found a workaround.
Instead of having the lua functions as described above in a lua.lua file loaded by a [lua] tag in the _main.cfg, I have them in a [lua] tag in a utils/lua.cfg file
My campaign, Bloodlust, is is need of feedback!
Post Reply