How to get player's stats from table #3

Closed
opened 2021-04-01 21:37:28 +00:00 by Envqu · 2 comments
Envqu commented 2021-04-01 21:37:28 +00:00 (Migrated from github.com)

Hi, how can I get player's variable from table?

My table contains columns: id | nick | level | xp

%{sql::level::1}% showing me levels of player with id 1.
Can I do something like this? %{sql::level::%player%}%?
I want to set variable to level of player who joined to the server but %player% and %{_player}% (set to player's nickname) sending <none>.

And I want to ask.. It is good idea to save 1000+ player's stats to variable in every 3 seconds?
Cause to refresh I must save that all again? It will not lag?

Hi, how can I get player's variable from table? My table contains columns: `id | nick | level | xp` `%{sql::level::1}%` showing me levels of player with id 1. Can I do something like this? `%{sql::level::%player%}%`? I want to set variable to level of player who joined to the server but %player% and %{_player}% (set to player's nickname) sending `<none>`. And I want to ask.. It is good idea to save 1000+ player's stats to variable in every 3 seconds? Cause to refresh I must save that all again? It will not lag?
GovindasOM commented 2021-04-01 21:40:08 +00:00 (Migrated from github.com)

you can loop the list variable and convert 1 to %player%, it is up to you how you implement the logic for it (it is definitely possible)

about saving a lot of stats to variable, it depends if you're using diskless variables or not, (?!-).* if not, that is a bad idea

you can loop the list variable and convert 1 to %player%, it is up to you how you implement the logic for it (it is definitely possible) about saving a lot of stats to variable, it depends if you're using diskless variables or not, (?!-).* if not, that is a bad idea
GovindasOM commented 2021-04-01 21:43:38 +00:00 (Migrated from github.com)

you may be able to think of something more efficient than saving 1000+ stats every 3 seconds, sounds like a bad design issue

you may be able to think of something more efficient than saving 1000+ stats every 3 seconds, sounds like a bad design issue
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Limework/skript-db#3
No description provided.