Page 1 of 1

"Type mismatch" error

Posted: Wed Mar 16, 2016 9:14 am
by []Yaroslav269[]
I made a level in PGE editor, but, when I run this level in SMBX editor, it crashes with a message:
Spoiler: show
Image
What it means? How I can fix error?
If you need, I can send a level

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 9:31 am
by Enjl
Did you by chance save one of your graphics as .png and rename it to .gif afterwards?

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 10:38 am
by bossedit8
This happens if a NPC text file has a Code in it that does not match to the whole coding system.

For example, if I have a Code that looks like this:

Code: Select all

speed=,5
It crashes SMBX with the Error Message "Type Mismatch". There are like unlimited possibilities that let it happen so make sure that everything you have typed in your NPC Text Files are correct.

Code: Select all

speed=5
Oh and I surely do not recommended to use Decimals in your code like this:

Code: Select all

speed=0.5
Or else it goes either incredible fast or it crashes with a error message. Check this Forum Topic Link for further Information on Decimals: http://www.supermariobrosx.org/forums/v ... =69&t=1659

Make sure that you have checked every NPC Text Files to prevent "misleaded" codes that doesn't match with SMBX. This is why the Error is called "Type Mismatch".

If that's not the issue, let us know!

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 12:29 pm
by Kevsoft
bossedit8 wrote:

Code: Select all

speed=0.5
Or else it goes either incredible fast or it crashes with a error message. Check this Forum Topic Link for further Information on Decimals: http://www.supermariobrosx.org/forums/v ... =69&t=1659
But it should work fine with SMBX 2.0 / most recent LunaLua

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 1:03 pm
by []Yaroslav269[]
Enjl wrote:Did you by chance save one of your graphics as .png and rename it to .gif afterwards?
Nope.

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 1:05 pm
by []Yaroslav269[]
bossedit8 wrote:This happens if a NPC text file has a Code in it that does not match to the whole coding system.

For example, if I have a Code that looks like this:

Code: Select all

speed=,5
It crashes SMBX with the Error Message "Type Mismatch". There are like unlimited possibilities that let it happen so make sure that everything you have typed in your NPC Text Files are correct.

Code: Select all

speed=5
Oh and I surely do not recommended to use Decimals in your code like this:

Code: Select all

speed=0.5
Or else it goes either incredible fast or it crashes with a error message. Check this Forum Topic Link for further Information on Decimals: http://www.supermariobrosx.org/forums/v ... =69&t=1659

Make sure that you have checked every NPC Text Files to prevent "misleaded" codes that doesn't match with SMBX. This is why the Error is called "Type Mismatch".

If that's not the issue, let us know!
Oh, thank you :D
I changed speed of Bully in PGE NPC editor. Probably, it saved this wrong.

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 1:39 pm
by h2643
No, it's the fault of SMBX and how it recognizes speed NPC codes.

Re: "Type mismatch" error

Posted: Wed Mar 16, 2016 2:31 pm
by bossedit8
Kevsoft wrote:But it should work fine with SMBX 2.0 / most recent LunaLua
Right... kinda forgot that this was a thing recently. I even made a video of it by having actual decimals on NPC codes:



Original link: http://www.youtube.com/watch?v=t1JjF49kmRY