LiteLDev / LegacyScriptEngine

A plugin engine for running LLSE plugins on LeviLamina
https://lse.liteldev.com/
GNU General Public License v3.0
43 stars 8 forks source link

[Bug]: Offline Economic Function Doesn't Work in onMoneyTrans Event #139

Closed Caldron47 closed 3 months ago

Caldron47 commented 3 months ago

Describe the bug

money.get(), money.add(), money.reduce(), etc throws not a function error when used in onMoneyTrans event

To Reproduce

mc.listen('onMoneyTrans', function(from, to, money) {
let mon = money.get(from);
});

will throw the error.

Expected behavior

All money functions can be used in money trans event.

Screenshots

No response

Platform

Windows 10

BDS Version

1.20.81

LeviLamina Version

0.12.3

LegacyScriptEngine Version

0.7.12

Additional context

No response

ShrBox commented 3 months ago

图片 I can't reproduce it.

ShrBox commented 3 months ago

According to your code, money is a variable.

Caldron47 commented 3 months ago

图片 I can't reproduce it.

Sorry i just realized it only happens in onMoneyTrans event

Caldron47 commented 3 months ago

According to your code, money is a variable.

Oh wait.. you are right 💀