Raised This Month: $ Target: $400
 0% 

HookUserMessage crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KawMAN
SourceMod Donor
Join Date: Sep 2007
Location: Cracov
Old 02-27-2010 , 10:22   HookUserMessage crash
Reply With Quote #1

i have a problem with HookUserMessage.

PHP Code:
public OnPluginStart()
{    
    
HookUserMessage(GetUserMessageId("SayText2"), UserMessageHooktrue);
}

public 
Action:UserMessageHook(UserMsg:MsgIdHandle:hBitBuffer, const iPlayers[], iNumPlayersbool:bReliablebool:bInit)
{
    
decl String:strMessage[256]="";

    
// Skip the first two bytes
    
BfReadByte(hBitBuffer);
    
BfReadByte(hBitBuffer);
    
    
// Read the message
    
BfReadString(hBitBufferstrMessagesizeof(strMessage), true);
    
    
    
//#Cstrike_Name_Change
    
if (StrContains(strMessage"#Cstrike_Name_Change"true) != -1
    {
        
// Read previous Name
        
BfReadString(hBitBufferstrMessagesizeof(strMessage), true);
        if (
StrContains(strMessage"sometestname"true) != -1
        {
            
//DEBUG POINT 1
            
return Plugin_Handled;
        }
        
//DEBUG POINT 2
    
}
    
//DEBUG POINT 3
    
return Plugin_Continue;

With this server crash in point 2 and 3 but no in point 1, so looks like server crash on Plugin_Continue.

Any ideas ? Its SourceMOD bug or my error.

Mod: Counter-Strike: Source
__________________
KawMAN is offline
Send a message via ICQ to KawMAN Send a message via Skype™ to KawMAN
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 02-27-2010 , 19:04   Re: HookUserMessage crash
Reply With Quote #2

If you're not using 1.3.1 (or newer), try there. If it still happens, file a bug report.
Fyren is offline
Reply



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 06:15.


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