Jump to content
AnnieRuru

Maintenance mode

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 patch
chrif->maintenance_color = 0xFFFF00;
change 0xFFFF00 into annie_is_stupid Edited by AnnieRuru

Share this post


Link to post
Share on other sites

so only my compiler so super doesn't throw errors =/ (microsoft visual c++)

 

Using old gcc that why im always got warning :swt3: ,

Share this post


Link to post
Share on other sites

 

 

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 by Luffy

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by Luffy

Share this post


Link to post
Share on other sites

 

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 patch
chrif->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]'

Share this post


Link to post
Share on other sites
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 by tlacson7

Share this post


Link to post
Share on other sites

 

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",
]

Share this post


Link to post
Share on other sites

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 file

but how come only mine getting error ?

 

try replace this line

char reason[99], esc_reason[198], esc_name[46], min_display[3];
into this
const char* reason;	char esc_reason[198], esc_name[46], min_display[3];;
didn't test

Share this post


Link to post
Share on other sites

 

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 file

but how come only mine getting error ?

 

try replace this line

char reason[99], esc_reason[198], esc_name[46], min_display[3];
into this
const 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 **'

Share this post


Link to post
Share on other sites

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 by AnnieRuru

Share this post


Link to post
Share on other sites

Annie, same.

atcommand.c: In function 'atcommand_maintenance':atcommand.c:9403: warning: format '[^' expects type 'char *', but argument 6 has type 'const char **'

 

 

dirty method

http://upaste.me/9e3531

 

can you tell how you compile your server ?

post-4102-0-28650700-1411134985_thumb.png

[info]: Compiled with Microsoft Visual C++ 2010 (v1600)

Share this post


Link to post
Share on other sites

 

Annie, same.

atcommand.c: In function 'atcommand_maintenance':atcommand.c:9403: warning: format '[^' expects type 'char *', but argument 6 has type 'const char **'

 

dirty method

http://upaste.me/9e3531

 

can you tell how you compile your server ?

attachicon.giftest_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!

Share this post


Link to post
Share on other sites

@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 reproduce

you 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

Share this post


Link to post
Share on other sites

 

@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 reproduce

you 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. :(

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 enny

enny 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

Share this post


Link to post
Share on other sites

Hi AnnieRuru thanks for this wonderful plugin, its very useful :D  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 arguments
maintenance.c: In function ‘buildin_maintenanceoff’:
maintenance.c:490: warning: format not a string literal and no format arguments
  PLUGIN  maintenance

Share this post


Link to post
Share on other sites

Tried to use this plugin, but im having an error during making it.

xZ1bV4T.png

 

@@AnnieRuru malloc.h no longer exist, how to fix this? please help :wub:
I really like your plugin, please do update this.
Thanks in advance! ^_^

Edited by Legend

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.