Jump to content

Export Error

Closed 1.0.2 1.0.3

LandOfTheBlind
LandOfTheBlind

Posted

Hello! I love the idea of this plugin. I'm working on a link to where I can export the Canvas image and update a photo frame on a set interval but I'm running into a problem with the Export API call. When I call Export from my plugin, I'm receiving this error in console:
 

(08:10:52) | Failed to call hook 'ExportCanvas' on plugin 'Canvas v1.0.2' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.Canvas.ExportCanvas (Oxide.Plugins.Canvas+Painting painting, System.Single scale, System.Int32 width, System.Int32 height, System.Boolean transparent, System.Int32 blur) [0x00000] in <d6898ea79d324e5ea265cf1dcfad70a4>:0

at Oxide.Plugins.Canvas.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00403] in <d6898ea79d324e5ea265cf1dcfad70a4>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <e23ba2c0f246426296d81c842cbda3af>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <50629aa0e75d4126b345d8d9d64da28d>:0

I am calling that API method from my plugin using this syntax:
 

byte[] imageData = (byte[])Canvas?.Call("ExportCanvas");

Maybe I'm just doing it wrong? An assistance would be much appreciated!

  • Love 1
  • Administrator
Raul-Sorin Sorban

Posted

Changed Status from Pending to Closed

Changed Fixed In to Next Version

  • Administrator
Raul-Sorin Sorban

Posted

I forgot to update the API docs on the last update. Pushing now another update and updating description. Sorry about this, kind of didn't expect anybody to use the API just yet haha

LandOfTheBlind

Posted

32 minutes ago, Raul-Sorin Sorban said:

I forgot to update the API docs on the last update. Pushing now another update and updating description. Sorry about this, kind of didn't expect anybody to use the API just yet haha

No worries, dude! I'm excited to add this cool idea to our community.

  • Administrator
Raul-Sorin Sorban

Posted

There's more to come to this, stay tuned! 🙂  Also, if you have any suggestions, let me know.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.