24/06/2024 20:58
Código:
console:
Por que está aparecendo este erro no console? Estou usando o plugin requests do Southclaws.
Obs: a request funciona normalmente, só esse erro que está me incomodando.
Código PHP:
#include "..\YSI-Includes\YSI_Coding\y_hooks"
hook OnGameModeInit()
{
new RequestsClient:client = RequestsClient("https://discord.com/api/webhooks/1254819501640515761/R2gzu84MXIHgiNUJX8UGnjsf0z8mWONfF9sTfBhYywOJMWbx_z_iqpyrbghgzaZN711k");
SendWebHook(client, "test-embed", 0);
return 1;
}
SendWebHook(RequestsClient:client, const title[], embed_color)
{
RequestJSON(
client,
"",
HTTP_METHOD_POST,
"OnWebHookResponse",
JsonObject(
"embeds", JsonArray(
JsonObject(
"title", JsonString("EMBED TEST"),
"color", JsonInt(embed_color),
"fields", JsonArray(
JsonObject(
"name", JsonString("`Players`"),
"value", JsonString("```prolog\n[0/50]\n```"),
"inline", JsonBool(true)
),
JsonObject(
"name", JsonString("`IP`"),
"value", JsonString("```prolog\n[127.0.0.7]\n```"),
"inline", JsonBool(true)
)
),
"author", JsonObject(
"name", JsonString("sabio_scripter"),
"icon_url", JsonString("https://i.postimg.cc/JhWsL9Hv/131c27a3f579208941f066d602bb32ee.webp")
),
"footer", JsonObject(
"text", JsonString("bysabio")
),
"timestamp", JsonString("2024-06-05T03:00:00.000Z"),
"image", JsonObject(
"url", JsonString("https://i.postimg.cc/JhWsL9Hv/131c27a3f579208941f066d602bb32ee.webp")
)
)
)
),
RequestHeaders("Content-Type", "application/json", "Accept", "application/json")
);
return 1;
}
forward OnWebHookResponse(Request:id, status, const responseData[], len);
public OnWebHookResponse(Request:id, status, const responseData[], len)
{
if (status == 200) {
printf("Webhook enviado com sucesso: %s", responseData);
} else {
printf("Falha ao enviar webhook. Status: %d, Resposta: %s", status, responseData);
}
return 1;
}
console:
Código PHP:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
filterscripts = "" (string)
Server Plugins
--------------
Loading plugin: sscanf.dll
===============================
sscanf plugin loaded.
Version: 2.13.8
(c) 2022 Alex "Y_Less" Cole
===============================
Loaded.
Loading plugin: YSF.dll
==============================================
YSF 2.2 (compiled Sep 19 2021 13:01:03) loaded
(c) 2008 Alex "Y_Less" Cole
(c) 2010 - 2018 kurta999
(c) 2018 - 2020 IllidanS4
Server version: 0.3.7 R2-1 or R2-2, Windows
==============================================
Loaded.
Loading plugin: crashdetect.dll
CrashDetect plugin 4.21
Loaded.
Loading plugin: streamer.dll
*** Streamer Plugin v2.9.5 by Incognito loaded ***
Loaded.
Loading plugin: FCNPC.dll
-------------------------------------------------
FCNPC - Fully Controllable NPC v2.0.9
Windows SA-MP 0.3.7 R2
Apr 17 2024 at 09:11:14
Author: OrMisicL (2013 - 2015)
Continued by: ziggi (2016 - present)
See full credits in the README.md file
-------------------------------------------------
Loading...
-------------------------------------------------
ColAndreasv1.4.0
Created By:
[uL]Chris42O
[uL]Slice
[uL]Pottus
-------------------------------------------------
Loading...
ColAndreas v1.4.0 Loaded.
Loaded.
Loading plugin: pawnraknet.dll
[Pawn.RakNet] plugin v1.6.0 loading...
[Pawn.RakNet]
| Pawn.RakNet 1.6.0 | 2016 - 2023
|--------------------------------
| Author and maintainer: katursis
| Compiled: Feb 12 2023 at 19:36:19
|--------------------------------------------------------------
| Repository: https://github.com/katursis/Pawn.RakNet
|--------------------------------------------------------------
| Wiki: https://github.com/katursis/Pawn.RakNet/wiki
Loaded.
Loading plugin: discord-connector.dll
>> discord-connector: afb7e3b successfully loaded.
Loaded.
Loading plugin: samp_bcrypt.dll
[SampBcrypt] [info]: Version: 0.4.0
Loaded.
Loading plugin: textdraw-streamer.dll
=================================
| |
| textdraw-streamer v2.0.3 |
| Loaded |
| |
| Coding: |
| |
| Burak (Nexor) |
| |
| Compiled: |
| |
| 29.09.2023, 16:49:07 |
| |
| Github: |
| |
| github.com/nexquery |
| |
| Discord: |
| |
| benburakya - Nexor#4730 |
| |
=================================
Loaded.
Loading plugin: requests.dll
Loaded.
Loading plugin: mysql.dll
>> plugin.mysql: R41-4 successfully loaded.
Loaded.
Loading plugin: nativechecker.dll
Loaded.
Loaded 12 plugins.
Started server on port: 7777, with maxplayers: 50 lanmode is OFF.
Filterscripts
---------------
Loaded 0 filterscripts.
No collision data found.
==============================================================
| |
| |
| YYYYYYY YYYYYYY SSSSSSSSSSSSSSS IIIIIIIIII |
| Y:::::Y Y:::::Y SS:::::::::::::::S I::::::::I |
| Y:::::Y Y:::::Y S:::::SSSSSS::::::S I::::::::I |
| Y::::::Y Y::::::Y S:::::S SSSSSSS II::::::II |
| YYY:::::Y Y:::::YYY S:::::S I::::I |
| Y:::::Y Y:::::Y S:::::S I::::I |
| Y:::::Y:::::Y S::::SSSS I::::I |
| Y:::::::::Y SS::::::SSSSS I::::I |
| Y:::::::Y SSS::::::::SS I::::I |
| Y:::::Y SSSSSS::::S I::::I |
| Y:::::Y S:::::S I::::I |
| Y:::::Y S:::::S I::::I |
| Y:::::Y SSSSSSS S:::::S II::::::II |
| YYYY:::::YYYY S::::::SSSSSS:::::S I::::::::I |
| Y:::::::::::Y S:::::::::::::::SS I::::::::I |
| YYYYYYYYYYYYY SSSSSSSSSSSSSSS IIIIIIIIII |
| |
| |
| (c) 2021 MPL v1.1 |
| Alex "Y_Less" Cole and contributors. |
| |
| |
==============================================================
==========================================
| |
| Generating code, this may take a |
| little bit of time. Note that this |
| code generation works best with the |
| JIT plugin, which you are not |
| currently using. Get it here: |
| |
| https://git.io/jit-plugin |
| |
| Please wait... |
| |
| Done in 315ms! |
| |
==========================================
Filterscript '../scriptfiles/callbackfix.amx' loaded.
| |
| Server: 0.3.7-R2 (W) |
| Started: 24 Jun 2024 - 18:44:12 |
| |
| Compiler: 3.10.10 (Windows) |
| Includes: 0.3.7 |
| Codepage: <none> |
| Built: 24 Jun 2024 - 18:43:57 |
| |
| YSI: v05.10.0006 |
| Master: -1 |
| |
| JIT: <none> |
| Crashdetect: <found> |
| |
==========================================
Conexao bem sucedida com o Banco de Dados [localhost]
GAMEMODE VERSION: (1.0)
Creditos:sabio_scripter
Number of vehicle models: 0
ERROR: failed to parse response as JSON: ''
Falha ao enviar webhook. Status: 204, Resposta:
Por que está aparecendo este erro no console? Estou usando o plugin requests do Southclaws.
Obs: a request funciona normalmente, só esse erro que está me incomodando.