Mari0 Crash Minus World
- mine209craft
- Posts: 91
- Joined: 15 Feb 2015, 20:59
- Contact:
I decided to put bowser in the minus world and when I click test in the minus world, I get this:
Last edited by mine209craft on 02 May 2015, 04:21, edited 2 times in total.
- I LÖVE LUA
- Posts: 222
- Joined: 12 Aug 2013, 13:19
That's because you can't place Bowser in the minus world, because of this (bowser.lua, line 197) :
So, since marioworld is equal to "M", you tried to "compare number with string".
Hope this helped ;-)
Code: Select all
--image
if marioworld <= 7 then
self.graphic = decoysimg
self.quad = decoysquad[marioworld]
end
Last edited by I LÖVE LUA on 02 Mar 2015, 18:32, edited 1 time in total.
- HugoBDesigner
- Posts: 2189
- Joined: 19 Sep 2012, 02:23
- Contact:
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
- I LÖVE LUA
- Posts: 222
- Joined: 12 Aug 2013, 13:19
Well, actually, it checks the marioworld variable, which is "M" here. So not a number. So you can't make arithmetic.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
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* !{}?'()+=><#%"
- HugoBDesigner
- Posts: 2189
- Joined: 19 Sep 2012, 02:23
- Contact:
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
Would this work?
Code: Select all
if marioworld == number and marioworld <= 7 then
self.graphic = decoysimg
self.quad = decoysquad[marioworld]
end
- I LÖVE LUA
- Posts: 222
- Joined: 12 Aug 2013, 13:19
Hugo : Your code is good too, but Bowser will be a Goomba.
Turret : Will crash because "number" is not a variable. At least which would be necessary only if we have tons of string worlds.
Turret : Will crash because "number" is not a variable. At least
Code: Select all
if type(marioworld) == "number"
But still technically solve the bugI LÖVE LUA wrote:which would be necessary only if we have tons of string worlds.
Though, in the lost levels there were worlds A, B, C and D, obvioisly not implemented in Mari0 but hey, it could work
- I LÖVE LUA
- Posts: 222
- Joined: 12 Aug 2013, 13:19
When I said tons, I ment every thing from AAA to ZZZ. But you are right, it'll work to.TurretBot wrote:But still technically solve the bugI LÖVE LUA wrote:which would be necessary only if we have tons of string worlds.
Though, in the lost levels there were worlds A, B, C and D, obvioisly not implemented in Mari0 but hey, it could work
So here are all code fixes :
- mine209craft
- Posts: 91
- Joined: 15 Feb 2015, 20:59
- Contact:
Oh I didn't know it crashes when I put bowser in minus world
- Mari0_Player
- Posts: 224
- Joined: 23 Sep 2013, 00:48
That was kind of obvious.mine209craft wrote:Oh I didn't know it crashes when I put bowser in minus world
- MissingWorld
- Posts: 230
- Joined: 06 Jan 2014, 01:45
Weren't you the one who made that discovery in the first place?mine209craft wrote:Oh I didn't know it crashes when I put bowser in minus world
- mine209craft
- Posts: 91
- Joined: 15 Feb 2015, 20:59
- Contact:
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
- I LÖVE LUA
- Posts: 222
- Joined: 12 Aug 2013, 13:19
Or edit an empty map, then rename it "M-..."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 use a mod that gives access to the M world.
- mine209craft
- Posts: 91
- Joined: 15 Feb 2015, 20:59
- Contact:
Crashed when I used alesan99's entities
-
- Posts: 1
- Joined: 23 Mar 2015, 23:30
@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 *-*
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 *-*