Page 1 of 1

Triple Lua error trouble

Posted: Wed Oct 25, 2023 6:05 pm
by mariobrigade2018
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

Re: Triple Lua error trouble

Posted: Thu Oct 26, 2023 1:30 am
by Emral
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

Re: Triple Lua error trouble

Posted: Thu Oct 26, 2023 12:10 pm
by mariobrigade2018
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?

Re: Triple Lua error trouble

Posted: Fri Oct 27, 2023 1:42 am
by Emral
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.

Re: Triple Lua error trouble

Posted: Fri Oct 27, 2023 9:19 am
by mariobrigade2018
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.