Raised This Month: $ Target: $400
 0% 

User Msg ScreenFade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
taheri6
Member
Join Date: Mar 2006
Old 12-22-2007 , 20:02   User Msg ScreenFade
Reply With Quote #1

Hey guys,

Im getting a wierd error and then my server shuts down, Ive never seen the error before and was wondering if some one could assist me.

Code:
FATAL ERROR (shutting down): User Msg 'ScreenFade': 12 bytes written, expected 10
There is only one place in my code that I am using that.

Code:
new gMsgScreenFade;
gMsgScreenFade		= get_user_msgid ( "ScreenFade" );


	message_begin( MSG_ONE, gMsgScreenFade, { 0, 0, 0 }, id );
	write_short( 1<<15 );
	write_short( 1<<10 );
	write_short( 1<<12 );
	write_byte( 255 );
	write_byte( 255 );
	write_byte( 255 );
	write_byte( 255 );
	message_end();

	message_begin(MSG_ONE,gmsgShake,{0,0,0},id);
	write_short( 255<< 14 ); //ammount
	write_short( 10 << 14 ); //lasts this long
	write_short( 255<< 14 ); //frequency
	message_end();
Any ideas?
taheri6 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-22-2007 , 20:19   Re: User Msg ScreenFade
Reply With Quote #2

May be the flag is wrong.
Code:
write_short( 1<<12 );

Try one of those :
Quote:
FFADE_IN 0x0000 // Just here so we don't pass 0 into the function
FFADE_OUT 0x0001 // Fade out (not in)
FFADE_MODULATE 0x0002 // Modulate (don't blend)
FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received
http://wiki.amxmodx.org/index.php/Ha...nts#HideWeapon
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
taheri6
Member
Join Date: Mar 2006
Old 12-22-2007 , 21:10   Re: User Msg ScreenFade
Reply With Quote #3

So you are suggesting:

Code:
new gMsgScreenFade;
gMsgScreenFade		= get_user_msgid ( "ScreenFade" );


	message_begin( MSG_ONE, gMsgScreenFade, { 0, 0, 0 }, id );
	write_short( 1<<15 );
	write_short( 1<<10 );
	write_short( FFADE_IN );
	write_byte( 255 );
	write_byte( 255 );
	write_byte( 255 );
	write_byte( 255 );
	message_end();

	message_begin(MSG_ONE,gmsgShake,{0,0,0},id);
	write_short( 255<<14 ); //ammount
	write_short( 10<<14 ); //lasts this long
	write_short( 255<<14 ); //frequency
	message_end();
instead?
__________________
http://www.yaur.com -=[Yaur]=- Clan Website
taheri6 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-22-2007 , 22:03   Re: User Msg ScreenFade
Reply With Quote #4

I suggest 0, but it depends on what you want to do.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
taheri6
Member
Join Date: Mar 2006
Old 12-22-2007 , 22:20   Re: User Msg ScreenFade
Reply With Quote #5

I am trying to have the screen flash and then slowly fade into normal.
__________________
http://www.yaur.com -=[Yaur]=- Clan Website
taheri6 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 12-23-2007 , 04:20   Re: User Msg ScreenFade
Reply With Quote #6

Code:
FFADE_OUT 0x0001 // Fade out (not in)
Put in plugin #define FFADE_OUT 0x0001 then write_short(FADE_OUT) or you can put 0, like connorr says.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
taheri6
Member
Join Date: Mar 2006
Old 12-23-2007 , 06:56   Re: User Msg ScreenFade
Reply With Quote #7

Thank you both for your assistance, I will try it out tomorrow
__________________
http://www.yaur.com -=[Yaur]=- Clan Website
taheri6 is offline
Reply


Thread Tools
Display Modes

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:01.


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