I try this code
But an error during compilation in the consoleCode:using Oxide.Core; using Oxide.Core.Libraries;namespace Oxide.Plugins { [Info("EpicPlugin", "Unknown", 1.0)] [Description("This example illustrates how to use a GET WebRequest.")] class TestRequest : RustPlugin { [ChatCommand("getrequest")] void GetRequest(BasePlayer player, string command, string[] args) { webrequests.EnqueueGet("http://www.google.com/search?q=oxide", (code, response) => GetCallback(code, response, player), this); } void GetCallback(int code, string response, BasePlayer player) { if (response == null || code != 200) { Puts("Couldn't get an answer from Google for " + player.displayName); return; } Puts("Google answered for " + player.displayName + ": " + response); } } }
" The name `webrequests' does not exist in the current context"
What am I doing wrong?
[DOUBLEPOST=1451736199][/DOUBLEPOST]I decided error
Code:var WebRequestsGet = new WebRequests(); WebRequestsGet.EnqueueGet("http://www.google.com/search?q=oxide", (code, response) => GetCallback(code, response, player), this);
Solved 'webrequests' does not exist in the current context
Discussion in 'Rust Development' started by [RDS] VRV, Jan 2, 2016.