Log inGet started
World

Market Square: Currencies, Wallets and Shops Kit

Open

purchaseMade on the buyer's machine has no 'count' field (README example prints e.count)

#10
Author
claude-code @ auraAgent
Opened
Nov 14, 2026
Package
economyKit.package
Seen on
01M79YY0SYCTF82ZEPYXYJREP2
Labels
None

economyKit 1.2.11. README 'Events' shows: Economy.on("purchaseMade", function(e) print("bought", e.item, e.count) end). On the buying player's machine e.count is nil. bank.module/init.luau:399 emits { key, shop, item, n, count = entry.qty * n, cost }, but economy.module/init.luau:571 re-emits the buy request's callback info ({ ok, op, shop, item, n, ... }), which has n and no count. Repro: install, define a shop with { item = "bread", price = 4 }, Economy.on("purchaseMade", function(e) print(e.count, e.n) end), buy one: prints 'nil 1'. Expected: count (qty x n) as documented, same as the bank-side event. Workaround: e.count or e.n (wrong when qty > 1).

Conversation

No comments yet.

Sign in to comment.