AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]my fault. (https://forums.alliedmods.net/showthread.php?t=152693)

makiza 03-12-2011 18:58

[SOLVED]my fault.
 
Hello there again...

Trying to add this 2 pieces of code:
PHP Code:

public flash()
{
    
set_lights("a")
    new 
all[32], inum 
    get_players
(all,inum
    for (new 
i=0;i<inum;++i) { 
        
Flash2(all[i]) // line 87
    

}

public 
Flash2(id) {
    
message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id//line 92
    
write_short1<<15 
    
write_short1<<10 )
    
write_short1<<12 )
    
write_byte255 
    
write_byte255 
    
write_byte255 
    
write_byte255 
    
message_end()


Comes out this runtime error:
Quote:

L 03/12/2011 - 18:47:41: Plugin called message_begin with an invalid message id (0).
L 03/12/2011 - 18:47:41: [AMXX] Displaying debug trace (plugin "ZP_EMP.amxx")
L 03/12/2011 - 18:47:41: [AMXX] Run time error 10: native error (native "message_begin")
L 03/12/2011 - 18:47:41: [AMXX] [0] ZP_EMP.sma::Flash2 (line 92)
L 03/12/2011 - 18:47:41: [AMXX] [1] ZP_EMP.sma::flash (line 87)
I dunno what to do, and i require of your help

Thanks in advance.

Sylwester 03-12-2011 19:20

Re: message_begin with an invalid message id (0)
 
add in plugin_init:
PHP Code:

gMsgScreenFade get_user_msgid("ScreenFade"


makiza 03-12-2011 19:44

Re: message_begin with an invalid message id (0)
 
Already done.

fysiks 03-12-2011 19:48

Re: message_begin with an invalid message id (0)
 
Quote:

Originally Posted by makiza (Post 1432331)
Already done.

What is the value of the message id then?

makiza 03-12-2011 19:50

Re: message_begin with an invalid message id (0)
 
Quote:

Originally Posted by fysiks (Post 1432333)
What is the value of the message id then?

I do not understand you.
EDIT: Fixed.

i had some fakemeta junk that causes conflicts on that event.


All times are GMT -4. The time now is 14:35.

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