Litro 45 Posted September 12, 2014 hi maam got some warning after patch... atcommand.c: In function 'atcommand_maintenance':atcommand.c:9403: warning: format '%99[^' expects type 'char *', but argument 6 has type 'char (*)[99]'atcommand.c:9381: warning: 'weekday' may be used uninitialized in this functionatcommand.c:9381: warning: 'hour' may be used uninitialized in this functionatcommand.c:9381: warning: 'minute' may be used uninitialized in this functionchrif.c: In function 'chrif_connectack':chrif.c:511: warning: 'weekday' may be used uninitialized in this functionchrif.c:511: warning: 'hour' may be used uninitialized in this functionchrif.c:511: warning: 'minute' may be used uninitialized in this functionscript.c: In function 'buildin_maintenance':script.c:18851: warning: 'weekday' may be used uninitialized in this functionscript.c:18851: warning: 'hour' may be used uninitialized in this functionscript.c:18851: warning: 'minute' may be used uninitialized in this function Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 12, 2014 (edited) so only my compiler so super doesn't throw errors =/ (microsoft visual c++) it just all short/int has to be initialize up version 1.2 to initialize all short/int variable also allows to change announcement color by changing intif->broadcast into intif->broadcast2 btw I broke 1st post ... jabote I share your pain now version 1.2 patch -> http://upaste.me/1ee741 plugin -> http://upaste.me/84177a . . . Hi annie.. how can i change the announce color?search around line 284 in the patchchrif->maintenance_color = 0xFFFF00;change 0xFFFF00 into annie_is_stupid Edited September 12, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
Litro 45 Posted September 12, 2014 so only my compiler so super doesn't throw errors =/ (microsoft visual c++) Using old gcc that why im always got warning , Quote Share this post Link to post Share on other sites
Luffy 14 Posted September 13, 2014 (edited) got warning on make plugin.maintenance maintenance.c: In function ‘atcommand_maintenance’:maintenance.c:222: warning: ‘group_id’ may be used uninitialized in this functionmaintenance.c:222: warning: ‘kick_duration’ may be used uninitialized in this functionmaintenance.c:222: warning: ‘maintenance_duration’ may be used uninitialized in this functionmaintenance.c:224: warning: ‘weekday’ may be used uninitialized in this functionmaintenance.c:224: warning: ‘hour’ may be used uninitialized in this functionmaintenance.c:224: warning: ‘minute’ may be used uninitialized in this functionmaintenance.c: In function ‘buildin_maintenance’:maintenance.c:401: warning: ‘weekday’ may be used uninitialized in this functionmaintenance.c:401: warning: ‘hour’ may be used uninitialized in this functionmaintenance.c:401: warning: ‘minute’ may be used uninitialized in this functionmaintenance.c: In function ‘server_online’:maintenance.c:145: warning: ‘weekday’ may be used uninitialized in this functionmaintenance.c:145: warning: ‘hour’ may be used uninitialized in this functionmaintenance.c:145: warning: ‘minute’ may be used uninitialized in this function do you still have the warning despite its working correctly now ? Its working now, its just that i didnt know we should activate the HPMHooking , im using the 1.2 got error on mallow . just added this on the plugin. #include "../common/malloc.h" Edited September 13, 2014 by Luffy Quote Share this post Link to post Share on other sites
GmOcean 92 Posted September 13, 2014 It was stated yesterday that it required HPMHooking, you also said you got it yesterday as well, did you somehow un-add that lol. At either rate, this plugin is awesome, it works great as intended. Perhaps the only thing you need to do now Annie, to prevent further repeat issues, is to just make a small notation at the First Post, about needing to enable HPMHooking. Quote Share this post Link to post Share on other sites
Luffy 14 Posted September 13, 2014 (edited) i didnt even said that i got it , i didnt even know HPMHooking, since Garr said what the problem..well problem solve Im Very Thankful for Granting my Request to AnnieRuRu <3 <3 <3 Edited September 13, 2014 by Luffy Quote Share this post Link to post Share on other sites
LiTo 0 Posted September 14, 2014 Nice plugin annie! We will surely implement this in our server. Thanks a lot. Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted September 15, 2014 so only my compiler so super doesn't throw errors =/ (microsoft visual c++) it just all short/int has to be initialize up version 1.2 to initialize all short/int variable also allows to change announcement color by changing intif->broadcast into intif->broadcast2 btw I broke 1st post ... jabote I share your pain now version 1.2 patch -> http://upaste.me/1ee741 plugin -> http://upaste.me/84177a . . . Hi annie.. how can i change the announce color?search around line 284 in the patchchrif->maintenance_color = 0xFFFF00;change 0xFFFF00 into annie_is_stupid @Annie can you help me why im getting this compile warning? atcommand.c:9404: warning: format '%99[^ ' expects type 'char *', but argument 6 has type 'char (*)[99]' Quote Share this post Link to post Share on other sites
astralprojection 35 Posted September 17, 2014 (edited) hi AnnieRuru im having errors like this using the plugin: [Error]: HPM:AddHook Fail! 'maintenance' tried to hook to 'pc->authok' but HPMHooking is disabled! [Error]: HPM:AddHook Fail! 'maintenance' tried to hook to 'clif->pLoadEndAck' but HPMHooking is disabled! how can i enable HPMHooking? Thank you. Edited September 17, 2014 by tlacson7 Quote Share this post Link to post Share on other sites
astralprojection 35 Posted September 17, 2014 hi AnnieRuru im having errors like this using the plugin: [Error]: HPM:AddHook Fail! 'maintenance' tried to hook to 'pc->authok' but HPMHooking is disabled! [Error]: HPM:AddHook Fail! 'maintenance' tried to hook to 'clif->pLoadEndAck' but HPMHooking is disabled! how can i enable HPMHooking? Thank you. Sorry for this, it was there!!! I was not reading briefly: plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ "HPMHooking", //"db2sql", //"sample", //"other", ] Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 18, 2014 Hadeszeus, on 15 Sept 2014 - 14:03, said: @Annie can you help me why im getting this compile warning? atcommand.c:9404: warning: format '[^ ' expects type 'char *', but argument 6 has type 'char (*)[99]' this is so weird, I just copy paste the syntax from all other atcommand within that filebut how come only mine getting error ? try replace this line char reason[99], esc_reason[198], esc_name[46], min_display[3];into thisconst char* reason; char esc_reason[198], esc_name[46], min_display[3];;didn't test Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted September 18, 2014 Hadeszeus, on 15 Sept 2014 - 14:03, said: @Annie can you help me why im getting this compile warning? atcommand.c:9404: warning: format '[^ ' expects type 'char *', but argument 6 has type 'char (*)[99]' this is so weird, I just copy paste the syntax from all other atcommand within that filebut how come only mine getting error ? try replace this line char reason[99], esc_reason[198], esc_name[46], min_display[3];into thisconst char* reason; char esc_reason[198], esc_name[46], min_display[3];;didn't test Annie, same. atcommand.c: In function 'atcommand_maintenance':atcommand.c:9403: warning: format '%99[^' expects type 'char *', but argument 6 has type 'const char **' Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 18, 2014 (edited) funny ... why your server always give me funny funny error that makes me headache ? honestly, can you post your ACMD(guild) ... isn't it something like this ? ACMD(guild){ char guild_name[NAME_LENGTH]; int prev; memset(guild_name, '0', sizeof(guild_name)); if (!message || !*message || sscanf(message, "%23[^n]", guild_name) < 1) { clif->message(fd, msg_txt(1030)); // Please enter a guild name (usage: @guild <guild_name>). return false; }....so either your server doesn't use the same format ...or your server just purposely hates me ??? EDIT: if this one doesn't work, I'm gonna use the dirty method char reason[100]; just 99 into 100 Edited September 18, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 19, 2014 Annie, same. atcommand.c: In function 'atcommand_maintenance':atcommand.c:9403: warning: format '[^' expects type 'char *', but argument 6 has type 'const char **' dirty methodhttp://upaste.me/9e3531 can you tell how you compile your server ? [info]: Compiled with Microsoft Visual C++ 2010 (v1600) Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted September 19, 2014 Annie, same. atcommand.c: In function 'atcommand_maintenance':atcommand.c:9403: warning: format '[^' expects type 'char *', but argument 6 has type 'const char **' dirty methodhttp://upaste.me/9e3531 can you tell how you compile your server ? test_server.png [info]: Compiled with Microsoft Visual C++ 2010 (v1600) I compile using 'Debian GNU/Linux 6.0.5 i'll try your dirty method Thanks Annie! Quote Share this post Link to post Share on other sites
astralprojection 35 Posted September 22, 2014 Please check on the server online return date . @maintenance 99 22 10 Backup run on Sep 23, 2014 (Tuesday) 6:38AM but i got this message. It should be "Server will come back up on Tuesday, 7:10 AM" Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 23, 2014 @maintenance 99 22 10 Backup run on Sep 23, 2014 (Tuesday) 6:38AM but i got this message. It should be "Server will come back up on Tuesday, 7:10 AM" can't reproduceyou should type @time to get real server actual time, not by your house clock from what I see, your server clock has -12 time zone different Quote Share this post Link to post Share on other sites
astralprojection 35 Posted September 23, 2014 @maintenance 99 22 10 Backup run on Sep 23, 2014 (Tuesday) 6:38AM but i got this message. It should be "Server will come back up on Tuesday, 7:10 AM" can't reproduceyou should type @time to get real server actual time, not by your house clock from what I see, your server clock has -12 time zone different tried @time and server time is same with my time zone. Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 23, 2014 try this on your SQL select now(); select from_unixtime ( unix_timestamp( now() ) ); both should return your server time if its different, sorry I dunno how to fix it Quote Share this post Link to post Share on other sites
vBrenth 39 Posted September 24, 2014 Hello annie i find this quite useful command for some rush maintenance, however is it possible not to get the vendors kick? i am always using vending persistency? Quote Share this post Link to post Share on other sites
astralprojection 35 Posted September 24, 2014 yah, its kicking all vendors. Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 24, 2014 apparently when I test it, at'er doesn't get kick by clif->authfail_fd, but get kick by clif->GM_kick . ACMD(test) { clif->authfail_fd( sd->fd, 1 ); return true;}#test ennyenny still continue vend @kick enny enny got kick . since my script using clif->authfail_fd, auto-traders doesn't get kick I just made 1.3 just now, just taking this chance to rewrite the script nothing much change, actually other than make the patch more understandable for napster to convert to rathena 1 evilpuncker reacted to this Quote Share this post Link to post Share on other sites
astralprojection 35 Posted August 14, 2015 Hi AnnieRuru thanks for this wonderful plugin, its very useful I only get this warning during compile. Can you check if you have time? thanks! /no1 maintenance.c: In function ‘buildin_maintenance’:maintenance.c:429: warning: format not a string literal and no format argumentsmaintenance.c: In function ‘buildin_maintenanceoff’:maintenance.c:490: warning: format not a string literal and no format arguments PLUGIN maintenance Quote Share this post Link to post Share on other sites
Legend 43 Posted December 6, 2015 (edited) Tried to use this plugin, but im having an error during making it. @@AnnieRuru malloc.h no longer exist, how to fix this? please help I really like your plugin, please do update this.Thanks in advance! Edited December 6, 2015 by Legend Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted December 6, 2015 malloc.h to memmgr.h 1 Legend reacted to this Quote Share this post Link to post Share on other sites