AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] What wrong here? (https://forums.alliedmods.net/showthread.php?t=237913)

Fuck For Fun 03-31-2014 15:46

[HELP] What wrong here?
 
Code:

L 03/31/2014 - 22:39:39: [AMXX] Run time error 10: native error (native "message_begin")
L 03/31/2014 - 22:39:39: [AMXX]    [0] Laser.sma::RoundEnd (line 51)

PHP Code:

public RoundEnd( )
{
    
message_begin(MSG_ALLget_user_msgid("g_iMsgID_ScreenFade"));
    
write_short(4096*1); // Duration
    
write_short(4096*2); // Hold time
    
write_short(4096); // Fade type
    
write_byte(0); // Red
    
write_byte(0); // Green
    
write_byte(0); // Blue
    
write_byte(255); // Alpha
message_end(); 


jok 03-31-2014 15:56

Re: [HELP] What wrong here?
 
// global variable:
PHP Code:

new g_iMsgId_ScreenFade

in public plugin_init( ):
PHP Code:

g_iMsgId_ScreenFade get_user_msgid"ScreenFade" ); 

in public RoundEnd( ):
PHP Code:

message_begin(MSG_ALLget_user_msgid("g_iMsgID_ScreenFade"));
->
message_begin(MSG_ALLg_iMsgID_ScreenFade); 


Fuck For Fun 03-31-2014 16:18

Re: [HELP] What wrong here?
 
Quote:

Originally Posted by jok (Post 2118470)
// global variable:
PHP Code:

new g_iMsgId_ScreenFade

in public plugin_init( ):
PHP Code:

g_iMsgId_ScreenFade get_user_msgid"ScreenFade" ); 

in public RoundEnd( ):
PHP Code:

message_begin(MSG_ALLget_user_msgid("g_iMsgID_ScreenFade"));
->
message_begin(MSG_ALLg_iMsgID_ScreenFade); 


Code:

message_begin(MSG_ALL, g_iMsgID_ScreenFade);
>?
Code:

message_begin(MSG_ALL, g_iMsgID_ScreenFade));
and i have error
Warning: Symbol is assigned a value that is never used: "g_iMsgId_ScreenFade" on line 85
Error: Number of arguments does not match definition on line 53
Error: Undefined symbol "g_iMsgID_ScreenFade" on line 53

YamiKaitou 03-31-2014 16:20

Re: [HELP] What wrong here?
 
Then attach the plugin and let us see the entire code, because you did something incorrect


All times are GMT -4. The time now is 05:58.

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