RUN TIME ERROR 13 - TYPE MISMATCH

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

Magna
Banned
Posts: 1493
Joined: Fri Jun 06, 2014 9:17 pm

RUN TIME ERROR 13 - TYPE MISMATCH

Postby Magna » Wed Oct 08, 2014 8:40 pm

How do you fix this?
Last edited by Magna on Thu Oct 09, 2014 8:04 am, edited 2 times in total.

Imaynotbehere4long
Boomerang Bro
Boomerang Bro
Posts: 1389
Joined: Thu Jan 23, 2014 3:00 pm

Re: RUN TIME ERROR 13 - TIMEMISMATCH

Postby Imaynotbehere4long » Wed Oct 08, 2014 10:31 pm

It has to do with NPC codes; if there is a decimal or comma (depending on your region) in one of the values, you will get that error. The only way to fix it is to remove the decimal or comma.

--EDIT--

Sorry, I was thinking of type mismatch, not time mismatch. I don't know what the problem is, then.

zioy
Reznor
Reznor
Posts: 2760
Joined: Thu Jul 17, 2014 4:47 pm
Pronouns: he/him
Contact:

Re: RUN TIME ERROR 13 - TIMEMISMATCH

Postby zioy » Wed Oct 08, 2014 10:32 pm

Imaynotbehere4long wrote:It has to do with NPC codes; if there is a decimal or comma (depending on your region) in one of the values, you will get that error. The only way to fix it is to remove the decimal or comma.

--EDIT--

Sorry, I was thinking of type mismatch, not time mismatch. I don't know what the problem is, then.
Runtime Error 13 is type mismatch
He typo'd

bossedit8
Banned
Posts: 6838
Joined: Fri Dec 20, 2013 12:35 pm
Contact:

Re: RUN TIME ERROR 13 - TIMEMISMATCH

Postby bossedit8 » Thu Oct 09, 2014 2:17 am

This specificaly 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.smbxgame.com/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".

Magna
Banned
Posts: 1493
Joined: Fri Jun 06, 2014 9:17 pm

Re: RUN TIME ERROR 13 - TIMEMISMATCH

Postby Magna » Thu Oct 09, 2014 7:40 am

I think the npc codes are alright but I gotta double check. And for some reason when I open it in PGE, it works. Does that say something?

Veudekato
Guest

Re: RUN TIME ERROR 13 - TIMEMISMATCH

Postby Veudekato » Thu Oct 09, 2014 8:57 am

Blue Bomber wrote:I think the npc codes are alright but I gotta double check. And for some reason when I open it in PGE, it works. Does that say something?
not pge. PlatGEnwohl*. he can open lvl files and edit them. and platgenwohl made in c++. smbx made in pascal. pascal have problem with decimal codes

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: RUN TIME ERROR 13 - TIMEMISMATCH

Postby Wohlstand » Mon Oct 20, 2014 12:34 pm

Blue Bomber wrote:I think the npc codes are alright but I gotta double check. And for some reason when I open it in PGE, it works. Does that say something?
SMBX is written in Visual Basic 6.
All bugs and crashes like "type mismatch" is a data parsing error. Because Redigit wasn't made pre-Parsing input checks, is a big dangerous to send wrong data to parser (converter of string to integer, float point number, boolean, etc.) and causing crash. Visual Basic have a most stupid parser: this parser always check the standard settings and converting decimals "0.5" or "0,5" by those settings. This thing should have a FORCE replacing comma or dot to the correct character for this region to prevent crash.

PGE is written in C++.
When you parse string data in C++ you will never get crash, but you will get the data trash! (for example, you converting string "3.5jj", but when you parse this wrong number, you will get the array of integers. I.e. you was got a not true data, but crash was not appeared! Even if you used only STL or clean C without any smart Qt, GTK+, boost, etc.). C++ always use dot character "0.5" as decimal and it is region independent. Also, into file parsing function I was add lots of pre-parsing checks. For example, if need "0.5" but got "0s.1", file loading will be aborted with error message about wrong file format, but application still opened and works. Also, for float point numbers I was add special parsing feature which allow to use BOTH decimal styles (AND 0.5 AND 0,5), but when you save file, will be used style with a dot.

C++ is a strict type language, I.e. you can't give to the string variable the double number without converting, will be compilation error. The crash in C++ possible only when:
- Attempt to try get/put data via wrong or null pointer
- Outed of array range.

Because I used the C++ instead of other languages:
because it is one of high-level languages which have compilers which creating the NATIVE executable format, and it's executables working quickly always (unlike .NET or Java which generating interpretable byte-code, but Java is platform-independent, .NET was ported to Linux with Mono project)
(also, in Visual Studio set the Visual C++ compiler is alone which can generate native quickest executable). (but for a lot of reasons, I used MinGW compiler for Windows, because it giving more faster executables and friendly with a cross-platform coding).


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari