diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-06-26 08:04:54 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-06-26 08:04:54 -0300 |
commit | 3925a5588a46bb8b592656d34793e3f0d51853e8 (patch) | |
tree | fe818f932904f5da7aaa11d356bef42d7fa1840f /npc/functions/util.txt | |
parent | f4100abbf37e7c353106a0f043e40c479c0c1904 (diff) | |
download | serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.tar.gz serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.tar.bz2 serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.tar.xz serverdata-3925a5588a46bb8b592656d34793e3f0d51853e8.zip |
Option to create a pincode will only show up at Tolchi's first Successful Craft
Account need 15 days.
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r-- | npc/functions/util.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt index a46f9b3ba..99dc2045f 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -1019,7 +1019,7 @@ function script json_encode { if (getargcount() < 2 || getargcount() % 2 != 0) return Exception("json_encode arguments must be paired"); - .@json="{"; + .@json$="{"; .@tab=true; // For arguments @@ -1028,24 +1028,24 @@ function script json_encode { if (.@tab) .@tab=false; else - .@json+=","; + .@json$+=","; // Input variable name - .@json+="\""+getarg(.@i)+"\": "; + .@json$+="\""+getarg(.@i)+"\": "; // Input variable value if (isstr(getarg(.@i+1))) - .@json+="\""+getarg(.@i+1)+"\""; + .@json$+="\""+getarg(.@i+1)+"\""; else - .@json+=getarg(.@i+1); + .@json$+=getarg(.@i+1); // Advance .@i++; } // Close the JSON - .@json+="}"; - return .@json; + .@json$+="}"; + return .@json$; } @@ -1053,7 +1053,7 @@ function script json_encode { // sends to API function script api_send { .@cde=getarg(0); - .@fm$=getarg(1); + .@fm$=escape_sql(getarg(1)); query_sql("INSERT INTO `api_export` (`type`, `data`) VALUES ('"+.@cde+"', \""+.@fm$+"\")"); return; } |