Raised This Month: $51 Target: $400
 12% 

Updater


Post New Thread Reply   
 
Thread Tools Display Modes
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 10-21-2014 , 19:06   Re: Updater
Reply With Quote #471

I need help putting Updater into my plugin. I have followed the directions correctly, but when I compile, I get this error.

Code:
donormenu.sp
donormenu.sp(76) : error 017: undefined symbol "updater"
donormenu.sp(78) : error 035: argument type mismatch (argument 1)

2 Errors.

Compilation Time: 0.27 sec
 ----------------------------------------
This is the code for my plugin: http://pastebin.com/77MrcxLj

Updater.txt
Code:
"Updater"
{
	"Information"
	{
		"Version"
		{
			"Latest"	"1.2"
		}
		
		"Notes"	"More info @ www.github.com Changes in 1.1:"
		"Notes"	"Added Updater Support"
	}
	
	"Files"
	{
		"Plugin"	"https://raw.githubusercontent.com/Sarabveer/SM-DonorMenu/master/addons/sourcemod/plugins/donormenu.smx"
		"Plugin"	"https://raw.githubusercontent.com/Sarabveer/SM-DonorMenu/master/addons/sourcemod/translations/donormenu.phrases.txt"

		"Source"	"https://raw.githubusercontent.com/Sarabveer/SM-DonorMenu/master/addons/sourcemod/scripting/donormenu.sp"
	}
}
__________________

Last edited by Sarabveer; 10-21-2014 at 19:19.
Sarabveer is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 10-22-2014 , 02:10   Re: Updater
Reply With Quote #472

Quote:
Originally Posted by Sarabveer View Post
I need help putting Updater into my plugin. I have followed the directions correctly, but when I compile, I get this error.

Code:
donormenu.sp
donormenu.sp(76) : error 017: undefined symbol "updater"
donormenu.sp(78) : error 035: argument type mismatch (argument 1)

2 Errors.

Compilation Time: 0.27 sec
 ----------------------------------------
This is the code for my plugin: http://pastebin.com/77MrcxLj
You have to change the name of your DonorMenu.name variable. It's conflicting with the OnLibraryAdded forward.
__________________
GoD-Tony is offline
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 10-22-2014 , 07:00   Re: Updater
Reply With Quote #473

Quote:
Originally Posted by GoD-Tony View Post
You have to change the name of your DonorMenu.name variable. It's conflicting with the OnLibraryAdded forward.
So I would replace "DonorMenu" with something else, like "dmenu"
__________________
Sarabveer is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 10-22-2014 , 07:27   Re: Updater
Reply With Quote #474

Quote:
Originally Posted by Sarabveer View Post
So I would replace "DonorMenu" with something else, like "dmenu"
Only the "String:name[32]" part needs a new name.
__________________
GoD-Tony is offline
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 10-22-2014 , 07:32   Re: Updater
Reply With Quote #475

Quote:
Originally Posted by GoD-Tony View Post
Only the "String:name[32]" part needs a new name.
Sorry, I'm a n00b at this, but cant change that, I think.
__________________
Sarabveer is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 10-22-2014 , 12:30   Re: Updater
Reply With Quote #476

PHP Code:
enum DonorMenu {
        
String:name[32],// <-- change this to dname[32] or something
        
String:title[128],
        
DonorMenuType:type,
        
Handle:items,
        
itemct

Also, I think, could be wrong, you need to change hmenu[name] to hmenu[dname], lines 127 and 192 of the pastebin you linked
__________________
View my Plugins | Donate
TnTSCS is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-22-2014 , 13:31   Re: Updater
Reply With Quote #477

Having unprefixed enums is just asking for a world of hurt.
__________________
asherkin is online now
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 10-22-2014 , 14:43   Re: Updater
Reply With Quote #478

Quote:
Originally Posted by TnTSCS View Post
PHP Code:
enum DonorMenu {
        
String:name[32],// <-- change this to dname[32] or something
        
String:title[128],
        
DonorMenuType:type,
        
Handle:items,
        
itemct

Also, I think, could be wrong, you need to change hmenu[name] to hmenu[dname], lines 127 and 192 of the pastebin you linked
Thanks, it Compiled.

https://github.com/Sarabveer/SM-Dono...9cd12291a62ead

https://travis-ci.org/Sarabveer/SM-D...uilds/38741332
__________________
Sarabveer is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-30-2014 , 16:10   Re: Updater
Reply With Quote #479

Are there any plans or tentative thoughts on allowing what plugins are allowed to be Updated to be configured from a cfg file?

I was thinking something like this:

PHP Code:
"Updater"
{
    
"someplugin.smx"
    
{
        
"plugin" "allow" //download the stuff marked "Plugin" in the updater txt file
        
"source" "deny"  //but don't download the "source" files
    
}
    
"someOtherplugin.smx"
    
{
        
"plugin" "deny" //don't ever download updates for someOtherplugin.smx, but put a notification in the log file
    
}
    
"randomAssThirdPlugin.smx"
    
{
        
"url" "http://example.com/sourcemod/randomAssThirdPlugin.txt"
        
//perhaps we could even allow updating of plugins that don't have updater.inc in them at all
    
}
    
"babysFirstPlugin.smx"
    
{
        
"check" "deny" //don't even check for updates for this plugin
    
}

Just throwing around ideas.
__________________

Last edited by ddhoward; 10-30-2014 at 16:12.
ddhoward is offline
yusufali
Member
Join Date: Feb 2014
Old 10-30-2014 , 17:44   Re: Updater
Reply With Quote #480

actually, being able to update plugins without updater will be more or less useful

I dont know how feasible that task is, but yea it would be very usefull. How i wish more people used updater in their plugins
__________________
yusufali is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode