i need add reference in my plugin its names Telegram.bot
but i have this error
Error while compiling: Clinet.cs(8,7): error CS0246: The type or namespace name `Telegram' could not be found. Are you missing an assembly reference?
my simple code is
help me !!Code:using Oxide.Core.Libraries.Covalence; using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using Telegram.Bot; namespace Oxide.Plugins { [Info("", "", "")] [Description("")] class Clinet : HurtworldPlugin { [ChatCommand("telegarm")] void start(PlayerSession session, string command, string[] args) { TelegramBotClient nn = new TelegramBotClient("TOKEN HERE"); hurt.SendChatMessage(session, "<color=#ffa500ff>adadsad</color>", "sad"); nn.SendTextMessageAsync("@er132", "456"); hurt.BroadcastChat("asd", "sad"); } } }
How add referernce ??
Discussion in 'Hurtworld Discussion' started by erfa.safaie, May 30, 2018.
-
Wulf Community Admin
// Reference: DLLname
At the top of the plugin. -
tnx man you make best
[DOUBLEPOST=1527712811][/DOUBLEPOST]Reference System.Net.Http.dll from Telegram.Bot.dll not found
Added '// Reference: Telegram.Bot' in plugin 'Clinet'
Error while compiling: Clinet.cs(25,16): error CS7069: Reference to type `System.Threading.CancellationToken' claims it is defined assembly `mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found
help meLast edited by a moderator: May 30, 2018 -
Wulf Community Admin
That should tell you the issue there, you're missing another DLL. -
fixed i added a refrence but this error
plugin 'Clinet'
Error while compiling: Clinet.cs(25,16): error CS7069: Reference to type `System.Threading.CancellationToken' claims it is defined assembly `mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089', but it could not be found
[DOUBLEPOST=1527715874][/DOUBLEPOST]actually mscorlib is good standing but idk what this error happend -
Wulf Community Admin