I where searching this to 1 month ago. i got it to work with this post: https://forums.skunity.com/threads/stylish-scoreboards-50mb.3626/Any idea where all the documentation went for Stylish scoreboards?
Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
I where searching this to 1 month ago. i got it to work with this post: https://forums.skunity.com/threads/stylish-scoreboards-50mb.3626/Any idea where all the documentation went for Stylish scoreboards?
Yeah I found this thread too, but I'm trying to find out if there is a way to detect if a certain slot is set to something, and if so do stuff. If that made any sense.Where search to like 1 month ago. i got it to work with this post: https://forums.skunity.com/threads/stylish-scoreboards-50mb.3626/
Yeah I found this thread too, but I'm trying to find out if there is a way to detect if a certain slot is set to something, and if so do stuff. If that made any sense.
StylishBoards:
- (stylish|style|simple) [score][ ]board %string% (1¦(is set|[does] exist[s])|2¦(is(n't| not) set|does(n't| not) exist[s]))
- '[the] (stylish|style|simple) [score][ ][board] of %player%'
- '%player%''s (stylish|style|simple) [score][ ][board]'
- '[skellett] (delete|remove) [the] id [based] [score] [(with [id]|named)] %string%
(in|from|for|of) (stylish|style|simple) [score][ ]board [with] [name[d]] %string%'
- '[skellett] create [a[n]] [new] id [based] [score] [(with [id]|named)] %string%
[(with|and)] [(text|string)] %string% [(in|with|for|and)] slot %number% (in|for|of)
(stylish|style|simple) [score][ ]board [with] [name[d]] %string%'
- '[skellett] [(update|edit)] [the] slot [of] id [based] [score] [(with [id]|named)]
%string%'
- '[skellett] (delete|remove) [the] (stylish|style|simple) [score][ ][board] [with]
[name[d]] %string%'
- '[skellett] create [a] [new] (stylish|style|simple) [score][ ]board [with] [name[d]]
%string%'
- '[skellett] [(update|edit)] [the] [(stylish|style|simple)] [score][ ]board [of]
id [based] [score] [(with [id]|named)] %string%'
- '[skellett] [(update|edit)] [the] (text|name|display|data|string) [of] id [based]
[score] [(with [id]|named)] %string%'
- '[skellett] [(update|edit)] [the] [display] title of (stylish|style|simple) [score][
][board] [named] %string%'
- '[skellett] [(update|edit)] [the] (stylish|style|simple) [score][ ][board] %string%[''s]
[display] title'
ding ding, perfect. thanks <o/In syntax.yml
code_language.skript:StylishBoards: - (stylish|style|simple) [score][ ]board %string% (1¦(is set|[does] exist[s])|2¦(is(n't| not) set|does(n't| not) exist[s])) - '[the] (stylish|style|simple) [score][ ][board] of %player%' - '%player%''s (stylish|style|simple) [score][ ][board]' - '[skellett] (delete|remove) [the] id [based] [score] [(with [id]|named)] %string% (in|from|for|of) (stylish|style|simple) [score][ ]board [with] [name[d]] %string%' - '[skellett] create [a[n]] [new] id [based] [score] [(with [id]|named)] %string% [(with|and)] [(text|string)] %string% [(in|with|for|and)] slot %number% (in|for|of) (stylish|style|simple) [score][ ]board [with] [name[d]] %string%' - '[skellett] [(update|edit)] [the] slot [of] id [based] [score] [(with [id]|named)] %string%' - '[skellett] (delete|remove) [the] (stylish|style|simple) [score][ ][board] [with] [name[d]] %string%' - '[skellett] create [a] [new] (stylish|style|simple) [score][ ]board [with] [name[d]] %string%' - '[skellett] [(update|edit)] [the] [(stylish|style|simple)] [score][ ]board [of] id [based] [score] [(with [id]|named)] %string%' - '[skellett] [(update|edit)] [the] (text|name|display|data|string) [of] id [based] [score] [(with [id]|named)] %string%' - '[skellett] [(update|edit)] [the] [display] title of (stylish|style|simple) [score][ ][board] [named] %string%' - '[skellett] [(update|edit)] [the] (stylish|style|simple) [score][ ][board] %string%[''s] [display] title'
It does work. You just can't use multiple queues. Just like SkQuery.
Make a simple function
code_language.skript:function mysql(queue: text, s: text) :: object: set {_resultset} to mysql result of query "%{_queue}%" return mysql object "%{_s}%" in {_resultset} set {_this} to mysql("SELECT * FROM Customers, Example", "Customers")
function mysql(queue: text, s: text) :: object:
set {_resultset} to mysql result of query "%{_queue}%"
return mysql object "%{_s}%" in {_resultset}
command /prb:
permission: Martin.Martin
executable by: console
trigger:
set {_this} to mysql("SELECT * FROM hsglobal.sugerencias", "Jugador")
send "%{_this}%" to the console
>sk reload pruebas
[13:14:24 ERROR]: Cannot use return effect outside of a function! (pruebas.sk, line 4: return mysql object "%{_s}%" in {_resultset}')
[13:14:24 INFO]: [Skript] Reloading pruebas.sk...
[13:14:24 INFO]: [Skript] Encountered 1 error while reloading pruebas.sk!
In this update I added the ability to configure the MySQL properties. You can read up about these at https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html
The MySQL.yml will have to be deleted then restart your server for these newer properties. The default properties allow for reconnection which helps you in the long term without reloading often.
The newer MySQL.yml is docmented so you can read up on that stuff.
That's not a Skellett issue. Try setting it to a local variable then returning that variable.
Could you give me an example please?That's not a Skellett issue. Try setting it to a local variable then returning that variable.
Something like this:Could you give me an example please?
I tried a lot of things, I do not know what I am doing wrong
set {_return} to mysql object "%{_s}%" in {_resultset}
return {_return}
Something like this:
code_language.skript:set {_return} to mysql object "%{_s}%" in {_resultset} return {_return}
[23:50:54 ERROR]: {_return} can only be set to one object, not more (pruebas.sk, line 3: set {_return} to mysql object "%{_s}%" in {_resultset}')
[23:50:54 ERROR]: Cannot use return effect outside of a function! (pruebas.sk, line 4: return {_return}')
command /prb:
permission: Martin.Martin
executable by: console
trigger:
set {_resultSet} to mysql result of query "SELECT * FROM hsglobal.registroDonacionesMP"
set {_data1::*} to mysql string "Jugador" in {_resultSet}
set {_resultSet2} to mysql result of query "SELECT * FROM hsglobal.registroDonacionesMP"
set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2}
send "%{_resultSet}%"
send "%{_resultSet2}%"
send "%{_data1::1}% %{_data2::1}%"
send "%{_data1::2}% %{_data2::2}%"
[13:38:52 INFO]: com.mysql.jdbc.JDBC42ResultSet@259ceb1c
[13:38:52 INFO]: com.mysql.jdbc.JDBC42ResultSet@5d8ee688
[13:38:52 INFO]: CraftMan 2978519698
[13:38:52 INFO]: barecito 2979213743
[13:38:52 INFO]: [Hunter] Y ese comando? Seguro que lo escribiste bien?
command /prb:
permission: Martin.Martin
executable by: console
trigger:
set {_resultSet} and {_resultSet2} to mysql result of query "SELECT * FROM hsglobal.registroDonacionesMP"
set {_data1::*} to mysql string "Jugador" in {_resultSet} #parsing 1
set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} #parsing 2
send "%{_resultSet}%"
send "%{_resultSet2}%"
send "%{_data1::1}% %{_data2::1}%"
send "%{_data1::2}% %{_data2::2}%"
[13:40:46 INFO]: com.mysql.jdbc.JDBC42ResultSet@6e57332d
[13:40:46 INFO]: com.mysql.jdbc.JDBC42ResultSet@6e57332d
[13:40:46 INFO]: CraftMan <none>
[13:40:46 INFO]: barecito <none>
[13:40:46 INFO]: [Hunter] Y ese comando? Seguro que lo escribiste bien?
set {_data1::*} to mysql string "Jugador" in {_resultSet} #parsing 1
set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} #parsing 2
set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} #parsing 2
set {_data1::*} to mysql string "Jugador" in {_resultSet} #parsing 1
We all know about this, it's not a bug. Just make multiple queries... Or a function to handle it all with the async thread in itYes, the same thing, I just have a doubt, it is possible for Skript to handle multiple rows/collumns by it self or using anyother addon?
If not then no problem I could make a simple java plugin for my projects, these are very simple, I just want to query some things..
if yes then how to?
[doublepost=1505494157,1505445164][/doublepost]I believe this is a bug of Skellet
Test 1:
This work as intended, (Since this can not handle multiple complete rows, just partial based on collumn, I had to perform 2 queries)
code_language.skript:command /prb: permission: Martin.Martin executable by: console trigger: set {_resultSet} to mysql result of query "SELECT * FROM hsglobal.registroDonacionesMP" set {_data1::*} to mysql string "Jugador" in {_resultSet} set {_resultSet2} to mysql result of query "SELECT * FROM hsglobal.registroDonacionesMP" set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} send "%{_resultSet}%" send "%{_resultSet2}%" send "%{_data1::1}% %{_data2::1}%" send "%{_data1::2}% %{_data2::2}%"
Result 1:
code_language.skript:[13:38:52 INFO]: com.mysql.jdbc.JDBC42ResultSet@259ceb1c [13:38:52 INFO]: com.mysql.jdbc.JDBC42ResultSet@5d8ee688 [13:38:52 INFO]: CraftMan 2978519698 [13:38:52 INFO]: barecito 2979213743 [13:38:52 INFO]: [Hunter] Y ese comando? Seguro que lo escribiste bien?
About the last log line:
[13:38:52 INFO]: [Hunter] Y ese comando? Seguro que lo escribiste bien?
Which is same to "unknown command message"
I dont know why it is showing up that message
Test 2:
This does not work as intended
code_language.skript:command /prb: permission: Martin.Martin executable by: console trigger: set {_resultSet} and {_resultSet2} to mysql result of query "SELECT * FROM hsglobal.registroDonacionesMP" set {_data1::*} to mysql string "Jugador" in {_resultSet} #parsing 1 set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} #parsing 2 send "%{_resultSet}%" send "%{_resultSet2}%" send "%{_data1::1}% %{_data2::1}%" send "%{_data1::2}% %{_data2::2}%"
Result 2:
code_language.skript:[13:40:46 INFO]: com.mysql.jdbc.JDBC42ResultSet@6e57332d [13:40:46 INFO]: com.mysql.jdbc.JDBC42ResultSet@6e57332d [13:40:46 INFO]: CraftMan <none> [13:40:46 INFO]: barecito <none> [13:40:46 INFO]: [Hunter] Y ese comando? Seguro que lo escribiste bien?
Again the same message:
[13:40:46 INFO]: [Hunter] Y ese comando? Seguro que lo escribiste bien?
Why after the "parsing 1" Skellett can not parse the {_resultSet2}?
If I invert it from
code_language.skript:set {_data1::*} to mysql string "Jugador" in {_resultSet} #parsing 1 set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} #parsing 2
to
code_language.skript:set {_data2::*} to mysql string "NumeroCobro" in {_resultSet2} #parsing 2 set {_data1::*} to mysql string "Jugador" in {_resultSet} #parsing 1
It will parse correctly the "parsing 2" but not "parsing 1"
Bug?
Hope it helps to identify the issue