I'm trying to compile the example plugin but I get errors I don't know how to fix:
Code:
dctest.sp(24) : error 172: methodmap 'DiscordWebHook' does not have a constructor
dctest.sp(24) : warning 213: tag mismatch
dctest.sp(25) : error 105: cannot find method or property DiscordWebHook.SetUsername
dctest.sp(26) : error 105: cannot find method or property DiscordWebHook.SlackMode
dctest.sp(26) : warning 213: tag mismatch
dctest.sp(27) : error 105: cannot find method or property DiscordWebHook.SetContent
dctest.sp(28) : error 105: cannot find method or property DiscordWebHook.Send
Why am I getting those errors with this code?
PHP Code:
#pragma semicolon 1
#define PLUGIN_VERSION "1.10"
#include <sourcemod>
#include <discord>
#define WEBHOOK "mywebhookurl"
public Plugin myinfo =
{
name = "Discord Test",
author = "Deathknife",
description = "",
version = PLUGIN_VERSION,
url = ""
};
public void OnPluginStart() {
RegConsoleCmd("sm_webhooktest", Cmd_Webhook);
}
public Action Cmd_Webhook(int client, int argc) {
DiscordWebHook hook = new DiscordWebHook(WEBHOOK);
hook.SetUsername("Testing");
hook.SlackMode = false;
hook.SetContent("Testing 1 2 3");
hook.Send();
delete hook;
}
I have placed the
discord.inc inside the /include/ folder, then compiling my plugin but I get those errors.
Have I missed something?