Open Xaver-DaRed opened 2 years ago
Betting money you're setting your ID local to the scripts/zone/IDs.lua
That doesn't pull the cached value, so need to require zones[
Well, not like "I" am. This is on a fresh untouched build.
This is more of a shift that needs to be made with dynamic lookups. We can't look at the file, because the values are changed at runtime. Instead, have to look at the resulting cached value. Songbirds in a Snowstorm was the first time I ran into this. Resolved by:
local pastBeaucedineID = zones[xi.zone.BEAUCEDINE_GLACIER_S]
as opposed to requiring the IDs.lua
This doesn't look like a problem with the function, but rather what is being passed into the function.
@claywar I have tested your fix related to this issue and it does correct this problem but creates another.
If you are to restart the server after making direct LUA change, this will again repeat the same error if the local is outside of the function for spawning a ZNM (Referencing a QM NPC)
If you place the local within the entity.onTrade = function this will correct the issue and return the proper Zone ID
Branch affected by issue
base
Steps to reproduce
As an example
!pos 488 -1 166 54 (Arrapago reef qm1 pos) !additem 2601 (pop item for Lil'Apkallu)
Trade the item we just added to the ??? we just warped to. The NM won't pop. Map log will return the following:
Expected behavior
I have no expectations, as in, I dont know if we should adjust the function or use a different (existing) method completely and deprecate the existing popFromQM.