[Abandoned] json.sk

API [Abandoned] json.sk 2.3

  • Welcome to skUnity!

    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 community!

    Now, what are you waiting for? Join the community now!

Rezz

Addon Developer
Jan 24, 2017
80
37
18
Rezz submitted a new resource:

json.sk - A fix for SkQuery's JSON messages for 1.8.3+ (and 1.9.x - 1.11.x) servers.

This script is intended for use with the Skript plugin (version 2.2)
dz9zqaF.png

RLOTwUx.png

dz9zqaF.png

__...​

Read more about this resource...
 
i got 7 error:


code_language.skript:
ERROR 'json({_to}, {_msg})' is not a boolean (yes/no) (json.sk, line 335: json({_to}, {_msg})')
ERROR 'jsonBroadcast(msg: text, color: boolean = true)' is not a text (json.sk, line 315: function jsonBroadcast(msg: text, color: boolean = true):')
ERROR 'json(to: text, msg: text, color: boolean = true)' is not a text (json.sk, line 302: function json(to: text, msg: text, color: boolean = true):')
ERROR 'jsonFormat(msg: text, color: boolean = true) :: text' is not a text (json.sk, line 205: function jsonFormat(msg: text, color: boolean = true) :: text:')
ERROR 'jsonSanitize(msg: text) :: text' is not a text (json.sk, line 182: function jsonSanitize(msg: text) :: text:')
ERROR 'jsonColorize(msg: text, default-color: text = "&r") :: text' is not a text (json.sk, line 124: function jsonColorize(msg: text, default-color: text = "&r") :: text:')
ERROR 'removeColor(msg: text) :: text' is not a text (json.sk, line 91: function removeColor(msg: text) :: text:')
 
i got 7 error:


code_language.skript:
ERROR 'json({_to}, {_msg})' is not a boolean (yes/no) (json.sk, line 335: json({_to}, {_msg})')
ERROR 'jsonBroadcast(msg: text, color: boolean = true)' is not a text (json.sk, line 315: function jsonBroadcast(msg: text, color: boolean = true):')
ERROR 'json(to: text, msg: text, color: boolean = true)' is not a text (json.sk, line 302: function json(to: text, msg: text, color: boolean = true):')
ERROR 'jsonFormat(msg: text, color: boolean = true) :: text' is not a text (json.sk, line 205: function jsonFormat(msg: text, color: boolean = true) :: text:')
ERROR 'jsonSanitize(msg: text) :: text' is not a text (json.sk, line 182: function jsonSanitize(msg: text) :: text:')
ERROR 'jsonColorize(msg: text, default-color: text = "&r") :: text' is not a text (json.sk, line 124: function jsonColorize(msg: text, default-color: text = "&r") :: text:')
ERROR 'removeColor(msg: text) :: text' is not a text (json.sk, line 91: function removeColor(msg: text) :: text:')
And what is the output of /version skript?

If it's anything lower than 2.2, consider updating. :emoji_wink:
 
Last edited by a moderator:
And what is the output of /version skript?

If it's anything lower than 2.2, consider updating. :emoji_wink:

i forget to check my skript version.
Thx, i will update my skript.
 
Is there a way to have multiple lines on a tooltip?
 
%nl% works for me:
json("@a","Test Text||ttp:§6Line 1%nl% §bLine 2")
 
I'm unable to reproduce that behavior.

xAlRCEJ.png


code_language.skript:
on chat:
    cancel event
    json("@a", "%player%: &6%message%||ttp:&eFirst line&r%nl%&7Second line")

upload_2017-2-11_0-29-23.png


I have managed to find the cause of this.

It seems that using Umbaska causes this problem, I'm using 3.3 and removing it seems to solve the issue.
 
@Rasor1911 it could be because the Core module is overriding the new line expression of skQuery, try using "system line" instead.
 
How can I set the load priority of this script?
Just putting a prefix on its name, changing the name of it to "+json.sk" or "1_json.sk" will make Skript load this script before others.
 
How can I set the load priority of this script?
Skript loads scripts in an A-Z order. Set it to a.sk or something like that. Have file sorting set by name A-Z and the top script will be loaded first. Remember: Skript won't load scripts that start with -, but you can use characters like that to load it first (I think "." puts it at the top?)

EDIT: I probably should of refresh before posting lol.
 
Thanks, I would suggest mentioning that into the plugin download page and also on spigot.
 
How can I set the load priority of this script?
So, instead of doing:
Just putting a prefix on its name, changing the name of it to "+json.sk" or "1_json.sk" will make Skript load this script before others.
and:
Skript loads scripts in an A-Z order. Set it to a.sk or something like that. Have file sorting set by name A-Z and the top script will be loaded first. Remember: Skript won't load scripts that start with -, but you can use characters like that to load it first (I think "." puts it at the top?)
I recommend creating a folder and moving json.sk into it. Folders are also loaded in alphabetical order, so I always put json.sk inside a directory called "__lib".

(I think "." puts it at the top?)
Periods in front of filenames will hide the file on Linux hosts, though. :emoji_stuck_out_tongue: