ItsMods

Full Version: Plugin version checker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
in line 5 :
CSHARP Code
  1. if (CurrentVersion != Version)


Error 1 'System.Version' is a 'type' but is used like a 'variable'

Sad
add this line :
private const decimal Version =1.2;
Or whatever is the version of your plugin
Thank you.
now:

Code:
Literal of type double cannot be implicitly converted to type 'decimal'; use an 'M' suffix to create a literal of this type

@archit i think its better improve this code by checking plugin MD5 with other once exist on the host. Big Grin
And release you new plugin for that Wink
and with your allow i can add this on my Se7enPlug Big Grin
That error is self explanatory just add a m at the ending of public const decimal Version = 1.2;
It should be public const decimal Version = 1.2m;
ok Thank you.
the plugin is work fine but there is problem here if the file "http://www.mysite.com/update.txt" not exist on host the plugin crashed with non error :|

and what about :
@archit i think its better improve this code by checking plugin MD5 with other once exist on the host. Big Grin
And release you new plugin for that Wink
and with your allow i can add this on my Se7enPlug
@archit pleas fix this plugin crash
plugin crashed when the file not exist on the host
You realize that you have to replace http://www.mysite.com/update.txt with your own link?
:|

i know (i am not stupid :|).

so when update.txt not exist or renamed the plugin crashed and not work. maybe its better add a warring for that.
Use try catch block.
Pages: 1 2