Lundstrong / LundstrongOrders

A beautiful ordering system, designed for your Roblox Cafe.
Apache License 2.0
2 stars 3 forks source link

[LOR-12] order Module error. #7

Open gmoddev opened 3 years ago

gmoddev commented 3 years ago

How are you running LundstrongOrders?

Describe the bug Testing with false players (eg random name) when creating an order ends with an error (18: Order Module)

I have found a couple of fixes, one being returning a new order with iscompleted true, which autocompletes, orderReciever being creator, returning nothing results in an error

sasial-dev commented 3 years ago

Can you send the actual error here? Please shoot me a discord message RE if you have the fixes ideas - your comment was slightly unclear.

gmoddev commented 3 years ago

It involves on line 18 in module order 03:27:40.841 ServerScriptService.LundstrongOrders.order:18: [LundstrongOrders] Unable to find player - Server - order:18 03:27:40.841 Stack Begin - Studio 03:27:40.841 Script 'ServerScriptService.LundstrongOrders.order', Line 18 - function new - Studio - order:18 03:27:40.841 Script 'ServerScriptService.LundstrongOrders.remoteHandler', Line 17 - Studio - remoteHandler:17 03:27:40.842 Stack End - Studio 03:27:40.876 ServerScriptService.LundstrongOrders.order:18: [LundstrongOrders] Unable to find player - Client - buttonHandler:95 03:27:40.876 Stack Begin - Studio 03:27:40.876 Script 'Players.Not_Lowest.PlayerGui.LundstrongOrders.cashierGui.buttonHandler', Line 95 - Studio - buttonHandler:95 03:27:40.876 Stack End - Studio Where when a player spams a random player thats not in the game inside the gui, you error with it (error("[LundstrongOrders] Unable to find player "..receiver)), and im unable to create other orders

The code I used to fix the error is `newOrder.orderReceiver = creator newOrder.orderCreator = creator newOrder.orderClaimer = false newOrder.id = #orders + 1 -- States newOrder.isClaimed = true newOrder.isCompleted = true

-- Items newOrder.items = {}