Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
Moderator: Forum Moderators
- Darthagnon
- Posts: 8
- Joined: November 18th, 2017, 9:21 pm
- Contact:
Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
Guess I shouldn't expect too much tech support for game mods, but thought I'd ask anyway.
After not playing Battle for Wesnoth for years, I finally installed 1.12.6 and am getting back into it. Also went and installed a few interesting-looking mods. One of these was the Ultra Super Death Gore Fest Chainsawer 3000 mod, which adds blood to the game.
It works perfectly, except for...
Whenever a unit dies, it posts a LUA error to the chat. It's clearable with Ctrl+X, but it would be kinda nice if I could either a) disable error reporting, or b) figure out some sort of fix.
The error it posts is the following:
I'd sure appreciate any help. I hope this is the right forum to post in.
Live long and prosper!
Darth Agnon
Monster Hunter, Planeswalker and Sith
After not playing Battle for Wesnoth for years, I finally installed 1.12.6 and am getting back into it. Also went and installed a few interesting-looking mods. One of these was the Ultra Super Death Gore Fest Chainsawer 3000 mod, which adds blood to the game.
It works perfectly, except for...
Whenever a unit dies, it posts a LUA error to the chat. It's clearable with Ctrl+X, but it would be kinda nice if I could either a) disable error reporting, or b) figure out some sort of fix.
The error it posts is the following:
Code: Select all
23:56 <Lua error> .../Ultra_Super_Death_Gore_Fest_Chainsawer_3000/usdgfc3.lua:68: attempt to index global 'helper' (a nil value)
stack traceback:
.../Ultra_Super_Death_Gore_Fest_Chainsawer_3000/usdgfc3.lua:68: in function 'cmd'
...es (x86)/Battle for Wesnoth 1.12.6\data\lua/wml-tags.lua:320: in function <...es (x86)/Battle for Wesnoth 1.12.6\data\lua/wml-tags.lua:284>
Live long and prosper!
Darth Agnon
Monster Hunter, Planeswalker and Sith
-
- Inactive Developer
- Posts: 503
- Joined: April 24th, 2016, 4:18 pm
Re: Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
Don't have the source (it's in the UMC mod) and not chasing down the error but if you want to:
The error message usually indicates you're missing a Lua module. Most likely from another UMC. The 'helper' was probably supposed to represent another module, but, for some reason, it did not load and 'helper' is nil as a result. There may have been a console log message, probably when the campaign or scenario was first loaded which would help identify the missing component. Or you could look at the Lua source in the scenario and see where helper is assigned (probably near the top of the file).
The error message usually indicates you're missing a Lua module. Most likely from another UMC. The 'helper' was probably supposed to represent another module, but, for some reason, it did not load and 'helper' is nil as a result. There may have been a console log message, probably when the campaign or scenario was first loaded which would help identify the missing component. Or you could look at the Lua source in the scenario and see where helper is assigned (probably near the top of the file).
I forked real life and now I'm getting merge conflicts.
Re: Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
I upload an attachment for the lua file; the error locates in line 68:Tad_Carlucci wrote:Don't have the source (it's in the UMC mod) and not chasing down the error but if you want to:
The error message usually indicates you're missing a Lua module. Most likely from another UMC. The 'helper' was probably supposed to represent another module, but, for some reason, it did not load and 'helper' is nil as a result. There may have been a console log message, probably when the campaign or scenario was first loaded which would help identify the missing component. Or you could look at the Lua source in the scenario and see where helper is assigned (probably near the top of the file).
Code: Select all
local death_code = helper.get_child(ucode, "death")
Since I am new to BFW, I don't know any built-in functions for Lua modding, but my coding instinct tells me that "helper" should refer to one of the built-in functions/global variables of BFW, right?
- Attachments
-
- usdgfc3.lua
- This is the lua source file that contains the error
- (6.35 KiB) Downloaded 472 times
- Pentarctagon
- Project Manager
- Posts: 5555
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
You do need to initialize the
helper
variable though. See here for an example.99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 1
- Joined: November 29th, 2017, 1:31 pm
Re: Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
It has been fixed.
Re: Lua Errors: Ultra Super Death Gore Fest Chainsawer 3000
There are some other errors reported in the log:Chainsawer wrote:It has been fixed.
20171128 21:31:17 error display: could not open image 'usdgfc3-heavy-light-2.png'
20171128 21:31:21 warning engine: variable_info: invalid WML array index, usdgfc3_items[0]
The image problem may be in line 130 of the lua file, and the invalid array index one may be in line 152.