[DiscordArchive] how it is right now it just goes through the table and returns the tickets with the players guid rig
[DiscordArchive] how it is right now it just goes through the table and returns the tickets with the players guid rig
Archived author: Crow • Posted: 2023-01-12T01:00:06.048000+00:00
Original source
how it is right now it just goes through the table and returns the tickets with the players guid right?
Archived author: Foe • Posted: 2023-01-12T01:00:23.449000+00:00
Original source
I also don't like the use of for i = 1, size of table in Lua
Archived author: Nix • Posted: 2023-01-12T01:00:33.134000+00:00
Original source
My suggestion really is a matter of "proper and scalable code" compared to "trashy and easy to bottleneck code"
Archived author: Nix • Posted: 2023-01-12T01:00:48.260000+00:00
Original source
Right now every time a player logs out, it goes through all tickets and checks if the player owns that ticket
Archived author: Nix • Posted: 2023-01-12T01:01:00.204000+00:00
Original source
This scales with the number of tickets total (Even tickets the player does not own)
Archived author: Crow • Posted: 2023-01-12T01:01:28.163000+00:00
Original source
what you're suggesting somehow just goes right to the tickets rather than scrolls through it?
Archived author: Nix • Posted: 2023-01-12T01:01:28.497000+00:00
Original source
Instead I'm proposing using a lookup table (key, val pair), which will always scale with the number of tickets for the given player
Archived author: Crow • Posted: 2023-01-12T01:01:40.993000+00:00
Original source
based on the guid
Archived author: Nix • Posted: 2023-01-12T01:01:41.966000+00:00
Original source
It goes right to the list of tickets owned by the player, instead of all tickets yes
Archived author: Nix • Posted: 2023-01-12T01:01:44.418000+00:00
Original source
Correct