Test jump block error

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

superdiego
Shy Guy
Shy Guy
Posts: 7
Joined: Mon Aug 15, 2022 8:08 pm
Pronouns: super

Test jump block error

Postby superdiego » Sat Jun 03, 2023 12:55 pm

Help me I'm doing a level but I got this error.
Please can you help me to fix this error.

Image

image link:https://ibb.co/w71Lt0r

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9876
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Test jump block error

Postby Emral » Sat Jun 03, 2023 10:41 pm

Share your code for jumpblock.lua

superdiego
Shy Guy
Shy Guy
Posts: 7
Joined: Mon Aug 15, 2022 8:08 pm
Pronouns: super

Re: Test jump block error

Postby superdiego » Sun Jun 04, 2023 10:23 am


Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9876
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Test jump block error

Postby Emral » Sat Jun 10, 2023 1:45 am

superdiego wrote:
Sun Jun 04, 2023 10:23 am
link(mediafire)
https://www.mediafire.com/file/d2dke76s ... k.lua/file
Thanks, sorry for the delay. I didn't see your response until now.
The error is in line 62. You are passing the NPC "p" to the "touch" function and later use it in block:hit as a 2nd argument. The 2nd argument to block:hit, however, only accepts players. The fix is to do v:hit(true, p) when p is a player, and v:hit(true) if not.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari