Mari0 Crash Minus World

General Mar0 discussion has been moved to this subforum!
Post Reply
User avatar
mine209craft
Posts: 91
Joined: 15 Feb 2015, 20:59
Contact:

Post » 01 Mar 2015, 22:01

I decided to put bowser in the minus world and when I click test in the minus world, I get this: Image
Last edited by mine209craft on 02 May 2015, 04:21, edited 2 times in total.

User avatar
I LÖVE LUA
Posts: 222
Joined: 12 Aug 2013, 13:19

Post » 02 Mar 2015, 17:52

That's because you can't place Bowser in the minus world, because of this (bowser.lua, line 197) :

Code: Select all

--image
if marioworld <= 7 then
	self.graphic = decoysimg
	self.quad = decoysquad[marioworld]
end
So, since marioworld is equal to "M", you tried to "compare number with string".
Change

Code: Select all

if marioworld <= 7 then
to

Code: Select all

if marioworld ~= "M" and marioworld <= 7 then
in bowser.lua
Hope this helped ;-)
Last edited by I LÖVE LUA on 02 Mar 2015, 18:32, edited 1 time in total.

User avatar
HugoBDesigner
Posts: 2188
Joined: 19 Sep 2012, 02:23
Contact:

Post » 02 Mar 2015, 18:07

That, or, to prevent problems with Bowser in -1 with buggy quads:

Code: Select all

if marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[math.abs(marioworld)]
end

User avatar
I LÖVE LUA
Posts: 222
Joined: 12 Aug 2013, 13:19

Post » 02 Mar 2015, 18:14

HugoBDesigner wrote:That, or, to prevent problems with Bowser in -1 with buggy quads:

Code: Select all

if marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[math.abs(marioworld)]
end
Well, actually, it checks the marioworld variable, which is "M" here. So not a number. So you can't make arithmetic.
I know you can read "world -1", but I read "world M-1", with "M" not drawn, since the char table is (main.lua, line 319):

Code: Select all

fontglyphs = "0123456789abcdefghijklmnopqrstuvwxyz.:/,\"C-_A* !{}?'()+=><#%"
Edit : Actualy, you need to check if marioworld ~= "M" BEFORE the marioworld <= 7

User avatar
HugoBDesigner
Posts: 2188
Joined: 19 Sep 2012, 02:23
Contact:

Post » 02 Mar 2015, 19:24

Oh, that's right. So maybe:

Code: Select all

if marioworld == "M" or marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[(marioworld == "M" and 1) or marioworld]
end

User avatar
TurretBot
Posts: 4412
Joined: 15 Mar 2012, 23:18
Contact:

Post » 02 Mar 2015, 20:36

Would this work?

Code: Select all

if marioworld == number and marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[marioworld]
end

User avatar
I LÖVE LUA
Posts: 222
Joined: 12 Aug 2013, 13:19

Post » 02 Mar 2015, 20:41

Hugo : Your code is good too, but Bowser will be a Goomba.
Turret : Will crash because "number" is not a variable. At least

Code: Select all

if type(marioworld) == "number"
which would be necessary only if we have tons of string worlds.

User avatar
TurretBot
Posts: 4412
Joined: 15 Mar 2012, 23:18
Contact:

Post » 02 Mar 2015, 20:49

I LÖVE LUA wrote:which would be necessary only if we have tons of string worlds.
But still technically solve the bug
Though, in the lost levels there were worlds A, B, C and D, obvioisly not implemented in Mari0 but hey, it could work

User avatar
I LÖVE LUA
Posts: 222
Joined: 12 Aug 2013, 13:19

Post » 02 Mar 2015, 21:25

TurretBot wrote:
I LÖVE LUA wrote:which would be necessary only if we have tons of string worlds.
But still technically solve the bug
Though, in the lost levels there were worlds A, B, C and D, obvioisly not implemented in Mari0 but hey, it could work
When I said tons, I ment every thing from AAA to ZZZ. But you are right, it'll work to.

So here are all code fixes :
I LÖVE LUA:

Code: Select all

if marioworld ~= "M" and marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[marioworld]
end
HugoBDesigner:

Code: Select all

if marioworld == "M" or marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[(marioworld == "M" and 1) or marioworld]
end
TurretBot:

Code: Select all

if type(marioworld) == "number" and marioworld <= 7 then
   self.graphic = decoysimg
   self.quad = decoysquad[marioworld]
end

User avatar
mine209craft
Posts: 91
Joined: 15 Feb 2015, 20:59
Contact:

Post » 03 Mar 2015, 02:59

Oh I didn't know it crashes when I put bowser in minus world

User avatar
Mari0_Player
Posts: 224
Joined: 23 Sep 2013, 00:48

Post » 03 Mar 2015, 03:16

mine209craft wrote:Oh I didn't know it crashes when I put bowser in minus world
That was kind of obvious.

User avatar
MissingWorld
Posts: 230
Joined: 06 Jan 2014, 01:45

Post » 03 Mar 2015, 15:19

mine209craft wrote:Oh I didn't know it crashes when I put bowser in minus world
Weren't you the one who made that discovery in the first place?

User avatar
theyelloworange
Posts: 3
Joined: 18 Feb 2015, 02:39

Post » 18 Mar 2015, 20:28

How do you even edit the minus world?

User avatar
mine209craft
Posts: 91
Joined: 15 Feb 2015, 20:59
Contact:

Post » 18 Mar 2015, 21:53

Thank you for helping! Ill do it later and theyelloworange you need to have M-1 In Your mappack and put 4 on warp with no welcome to warp zone and you can do anything

User avatar
I LÖVE LUA
Posts: 222
Joined: 12 Aug 2013, 13:19

Post » 18 Mar 2015, 21:58

mine209craft wrote:Thank you for helping! Ill do it later and theyelloworange you need to have M-1 In Your mappack and put 4 on warp with no welcome to warp zone and you can do anything
Or edit an empty map, then rename it "M-..."

Or use a mod that gives access to the M world.

User avatar
mine209craft
Posts: 91
Joined: 15 Feb 2015, 20:59
Contact:

Post » 18 Mar 2015, 22:03

Crashed when I used alesan99's entities

KubaPL20935
Posts: 1
Joined: 23 Mar 2015, 23:30

Post » 24 Mar 2015, 00:46

@offtopic

Uh Oh, watch on the address

viewtopic.php?f=8&t=4666

WTF


@edit
Wow really for spammy post i get one positive point? Thanks *-*

IUndercoverTroll
Posts: 2
Joined: 01 Apr 2015, 02:21

Post » 01 Apr 2015, 08:22

howd you get acces to editing minus world

Squidish
Posts: 678
Joined: 05 Apr 2014, 04:04

Post » 01 Apr 2015, 15:53

KubaPL20935 wrote:@offtopic

Uh Oh, watch on the address

viewtopic.php?f=8&t=4666

WTF


@edit
Wow really for spammy post i get one positive point? Thanks *-*
Yeah
Welcome to the forums or whatever

Post Reply