Triple Lua error trouble

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 612
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Triple Lua error trouble

Postby mariobrigade2018 » Wed Oct 25, 2023 6:05 pm

I am getting three errors testing out some custom NPC. 1 is for bettereffects, and two are for...beattimer?
Here are the errors:

Image

Image

Image

And here is the link to the file:
https://drive.google.com/file/d/18uhr0N ... sp=sharing

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Triple Lua error trouble

Postby Emral » Thu Oct 26, 2023 1:30 am

if you dismiss one error, some code doesn't execute, and more errors happen. generally speaking, only the first error ever actually matters.
in this case, it appears to be saying that you are missing an image for an effect you are trying to spawn

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 612
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: Triple Lua error trouble

Postby mariobrigade2018 » Thu Oct 26, 2023 12:10 pm

Emral wrote:
Thu Oct 26, 2023 1:30 am
if you dismiss one error, some code doesn't execute, and more errors happen. generally speaking, only the first error ever actually matters.
in this case, it appears to be saying that you are missing an image for an effect you are trying to spawn
That was my suspicion with the effect, but I wanted to check. *sigh* The problem is that I have around 80 custom NPCs, and since this error only shows up once, I'm going to have to sort out a whole lot of code. Any tips?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Triple Lua error trouble

Postby Emral » Fri Oct 27, 2023 1:42 am

mariobrigade2018 wrote:
Thu Oct 26, 2023 12:10 pm
Emral wrote:
Thu Oct 26, 2023 1:30 am
if you dismiss one error, some code doesn't execute, and more errors happen. generally speaking, only the first error ever actually matters.
in this case, it appears to be saying that you are missing an image for an effect you are trying to spawn
That was my suspicion with the effect, but I wanted to check. *sigh* The problem is that I have around 80 custom NPCs, and since this error only shows up once, I'm going to have to sort out a whole lot of code. Any tips?
you could just open your folder with all the files in visual studio code or notepad++ and search all files for code that deals with effect ids (registerHarmTypes, Effect.spawn) to see if it spawns any invalid ids you renamed. But it might be faster to just look through your folder and see if every effect txt has a effect png to go along with it. Maybe that suffices.

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 612
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: Triple Lua error trouble

Postby mariobrigade2018 » Fri Oct 27, 2023 9:19 am

Emral wrote:
Fri Oct 27, 2023 1:42 am
mariobrigade2018 wrote:
Thu Oct 26, 2023 12:10 pm
Emral wrote:
Thu Oct 26, 2023 1:30 am
if you dismiss one error, some code doesn't execute, and more errors happen. generally speaking, only the first error ever actually matters.
in this case, it appears to be saying that you are missing an image for an effect you are trying to spawn
That was my suspicion with the effect, but I wanted to check. *sigh* The problem is that I have around 80 custom NPCs, and since this error only shows up once, I'm going to have to sort out a whole lot of code. Any tips?
you could just open your folder with all the files in visual studio code or notepad++ and search all files for code that deals with effect ids (registerHarmTypes, Effect.spawn) to see if it spawns any invalid ids you renamed. But it might be faster to just look through your folder and see if every effect txt has a effect png to go along with it. Maybe that suffices.
I searched "effect-" where the folder was, and every image had a .txt file. So it's most likely an invalid id.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari