Quantcast
Channel: Super Mario Bros. X Forums
Viewing all articles
Browse latest Browse all 2929

LunaLua • Re: modernReserveItems.lua v1.3 - SM3DL/SM3DW reserve mechanics

$
0
0
Strange bug I found: the library has it's onPostReserveUse function setup like this:

Code:

function modernReserveItems.onPostReserveUse(npc, p)    -- emptyend
Super awesome that this is available, and helps a lot with a weird thing I'm doing, but when it's called at the end of .drop, it's setup like THIS:

Code:

p.reservePowerup = 0modernReserveItems.onPostReserveUse(p, MRINPC)return MRINPC
This is a pretty easy fix I know, but I figured I should call it out before I do anything with these. Especially since I don't want to swap the variables around in one of these places and have the proper fix swap them in the other place, if that makes sense.
i'm not sure what your pointing out here? i can't call something after return is called as that stops execution of that scope last i knew.
Ah, I'm sorry. I was trying to point out that the "external wrappers" example of onPostReserveUse had (npc, p), while the call to the function near the bottom with return MRINPC had (p, MRINPC), swapping the variables around. Wasn't trying to say anything about the return part lol.

Statistics: Posted by AppleTheTomato — Sat Feb 24, 2024 11:49 am



Viewing all articles
Browse latest Browse all 2929

Trending Articles