AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MSG 23 Error ? (https://forums.alliedmods.net/showthread.php?t=20021)

Zenith77 10-30-2005 15:15

MSG 23 Error ?
 
1 Attachment(s)
Hello, I get this error when i acitvate this code ( pic at bottom...if you cant read it it says "New message started when msg 23 has not been sent yet!"
)

Code:
public cmdStreamRed(id) {         if( !get_cvar_num("sv_glow") ) {                 client_print(id, print_chat, "[AMXX] Sorry, GAIO (Glow All in One) is disabled!")                 return PLUGIN_HANDLED     }         if( !is_user_alive(id))  {                 client_print(id, print_chat, "[AMXX] You must be alive in order to have a stream!" )                 return PLUGIN_HANDLED     }         if( g_GlowStreamColor[id] == GLOW_RED) {                 client_print(id, print_chat, "[AMXX] You are already have a red stream!" )                 return PLUGIN_HANDLED     }                 if( g_GlowStreamColor[id] == GLOW_CUSTOM || g_GlowStreamColor[id] == GLOW_ADMIN ) {                 new i                 for( i = 0;i < 2; i++ ) {                         g_GlowStreamCustomColor[id][i] = 0         }                 remove_task(TASK_REFRESH_STREAM+id)     }         else if( g_GlowStreamColor[id] != GLOW_NULL) { // Make sure that he is glowing a color         // so we know that the task exists....                 remove_task(TASK_REFRESH_STREAM+id)             }         client_print(id, print_chat, "[AMXX] You now have a red stream!" )         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)            write_byte(22)              // TE_BEAMFOLLOW 22         write_short(id)             // short (entity:attachment to follow)     write_short(g_LaserSprite)      // short (sprite index)     write_byte(2)               // byte (life in 0.1's)     write_byte(10)              // byte (line width in 0.1's)     write_byte(255)             // byte (color)     write_byte(0)               // byte (color)     write_byte(0)               // byte (color)     write_byte(100)             // byte (brightness)         g_GlowStreamColor[id] = GLOW_RED         g_GlowStreamCustomColor[id][0] = 255     g_GlowStreamCustomColor[id][1] = 0     g_GlowStreamCustomColor[id][2] = 0         set_task(1.5, "refreshStream", TASK_REFRESH_STREAM+id, "b")         return PLUGIN_HANDLED }

Set Task Function:

Code:
public refreshStream(id) {         id -= TASK_REFRESH_STREAM         if( !get_cvar_num("sv_glow") ) {                 remove_task(TASK_REFRESH_STREAM+id)                 return PLUGIN_HANDLED             }         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)            write_byte(22)              // TE_BEAMFOLLOW 22         write_short(id)             // short (entity:attachment to follow)     write_short(g_LaserSprite)      // short (sprite index)     write_byte(2)               // byte (life in 0.1's)     write_byte(10)              // byte (line width in 0.1's)     write_byte(g_GlowStreamCustomColor[id][0])// byte (color)     write_byte(g_GlowStreamCustomColor[id][1])// byte (color)       write_byte(g_GlowStreamCustomColor[id][2])// byte (color)     write_byte(100)             // byte (brightness)             return PLUGIN_HANDLED     }

I thought maybe i was sending the message to fast through set_task, but I
doubt it.....

Thnx for all you help....

--Zenith77

XxAvalanchexX 10-30-2005 15:22

You forgot message_end()

Zenith77 10-30-2005 15:28

*DOH*


lol....


All times are GMT -4. The time now is 23:55.

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