Raised This Month: $32 Target: $400
 8% 

get_msg_block


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Smatify
Senior Member
Join Date: Nov 2012
Location: Where ever you want
Old 05-26-2013 , 16:07   get_msg_block
Reply With Quote #1

Hi,

on our SlenderMan - Mod we get an error:

Thanks to rocofelu who posted the error
PHP Code:
L 05/26/2013 22:40:34Start of error session.
L 05/26/2013 22:40:34Info (map "de_0815_alps") (file "addons/amxmodx/logs/error_20130526.log")
L 05/26/2013 22:40:34Invalid message id
L 05
/26/2013 22:40:34: [AMXXDisplaying debug trace (plugin "slenderman_1_0_6.amxx")
L 05/26/2013 22:40:34: [AMXXRun time error 10native error (native "get_msg_block")
L 05/26/2013 22:40:34: [AMXX]    [0slenderman_1_0_6.sma::team_choice (line 802)

L 05/26/2013 22:03:33Invalid message id
L 05
/26/2013 22:03:33: [AMXXDisplaying debug trace (plugin "slenderman_1_0_6.amxx")
L 05/26/2013 22:03:33: [AMXXRun time error 10native error (native "get_msg_block")
L 05/26/2013 22:03:33: [AMXX]    [0slenderman_1_0_6.sma::team_choice (line 758)
L 05/26/2013 22:10:31Invalid message id

L 05
/26/2013 21:51:43Invalid message id
L 05
/26/2013 21:51:43: [AMXXDisplaying debug trace (plugin "slenderman_1_0_6.amxx")
L 05/26/2013 21:51:43: [AMXXRun time error 10native error (native "get_msg_block")
L 05/26/2013 21:51:43: [AMXX]    [0slenderman_1_0_6.sma::team_choice (line 784)

L 05/26/2013 21:51:46Invalid message id
L 05
/26/2013 21:51:46: [AMXXDisplaying debug trace (plugin "slenderman_1_0_6.amxx")
L 05/26/2013 21:51:46: [AMXXRun time error 10native error (native "get_msg_block")
L 05/26/2013 21:51:46: [AMXX]    [0slenderman_1_0_6.sma::team_choice (line 792)
L 05/26/2013 21:52:00Invalid message id 

The code in the mod :
PHP Code:
/* Team Manager */
public message_ShowMenu(iMsgidiDestid)
{
   static 
sMenuCode[iMaxLen];
   
get_msg_arg_string(4sMenuCodesizeof(sMenuCode) - 1)
   if(
equal(sMenuCodeFIRST_JOIN_MSG) || equal(sMenuCodeFIRST_JOIN_MSG_SPEC))
   {
      
show_team_menu(id)
      return 
PLUGIN_HANDLED
      
   
}
   return 
PLUGIN_CONTINUE;
}

public 
message_VGUIMenu(iMsgidiDestid)
{
   if(
get_msg_arg_int(1) != VGUI_JOIN_TEAM_NUM)
   {
      return 
PLUGIN_CONTINUE;
   }
   
   
show_team_menu(id)
   return 
PLUGIN_HANDLED;
}

public 
count_teams()
{
   
CTCount 0
   TCount 
0
   
   
   
new Players[32
   new 
playerCount
   get_players
(PlayersplayerCount""
   for (
i=0i<playerCounti++) 
   {
      if (
is_user_connected(Players[i])) 
      {
         if (
cs_get_user_team(Players[i]) == CS_TEAM_CTCTCount++
         if (
cs_get_user_team(Players[i]) == CS_TEAM_TTCount++
      }
   }
}

public 
team_choice(idmenuitem)
{
   static 
dst[32], data[5], accesscallback
   
static restorevguimsgblock

   
if(item == MENU_EXIT)
   {
      
msgblock get_msg_block(g_MsgShowMenu)
      
set_msg_block(g_MsgShowMenuBLOCK_ONCE)
      
engclient_cmd(id"jointeam""2")
      
engclient_cmd(id"joinclass""2")
      
set_msg_block(g_MsgShowMenumsgblock)
      
menu_destroy(menu)
      return 
PLUGIN_HANDLED
   
}

   
restore get_pdata_int(idm_iVGUI)
   
vgui restore & (1<<0)
   if(
vgui)
      
set_pdata_int(idm_iVGUIrestore & ~(1<<0))

   
   
menu_item_getinfo(menuitemaccessdatacharsmax(data), dstcharsmax(dst), callback)
   
menu_destroy(menu)
   
   
   
   switch(
data[0])
   {
      case(
'1'): 
      {            
         
count_teams()
         
         if(
TCount 1)
         {
            
msgblock get_msg_block(g_MsgShowMenu)
            
set_msg_block(g_MsgShowMenuBLOCK_ONCE)
            
engclient_cmd(id"jointeam""1")
            
engclient_cmd(id"joinclass""1")
            
set_msg_block(g_MsgShowMenumsgblock)
         }
         else
         {
            
msgblock get_msg_block(g_MsgShowMenu)
            
set_msg_block(g_MsgShowMenuBLOCK_ONCE)
            
engclient_cmd(id"jointeam""2")
            
engclient_cmd(id"joinclass""2")
            
set_msg_block(g_MsgShowMenumsgblock)
         }

      }
      case(
'2'): 
      {
         
msgblock get_msg_block(g_MsgShowMenu)
         
set_msg_block(g_MsgShowMenuBLOCK_ONCE)
         
engclient_cmd(id"jointeam""2")
         
engclient_cmd(id"joinclass""2")
         
set_msg_block(g_MsgShowMenumsgblock)
      }
      
   }
   if(
vgui)
      
set_pdata_int(idm_iVGUIrestore)
   return 
PLUGIN_HANDLED
}



public 
show_team_menu(id)
{
   static 
menu
   
   menu 
menu_create("Select Your Team:""team_choice")
   
   if(
TCount 1menu_additem(menu"Slender""1"0)
   else 
menu_additem(menu"\dSlender""1"0)
   
menu_additem(menu"Human""2"0)
   
menu_display(idmenu)
   
   return 
PLUGIN_HANDLED
}

public 
jointeam(id)
   return 
PLUGIN_HANDLED 
Can someone help me?
__________________
Selling Hosting stuff such as Webspace and Game- & VoiceServer

I'm also selling Steam Keys.
For more informations, contact me.

(Homepage is under development)
Smatify is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-26-2013 , 20:48   Re: get_msg_block
Reply With Quote #2

You must assign a proper value to it.
Code:
// plugin_init g_MsgShowMenu = get_user_msgid("ShowMenu");
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 05-27-2013 , 04:11   Re: get_msg_block
Reply With Quote #3

Quote:
Originally Posted by v3x View Post
You must assign a proper value to it.
Code:
// plugin_init g_MsgShowMenu = get_user_msgid("ShowMenu");
you're still active
EpicMonkey is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-27-2013 , 08:34   Re: get_msg_block
Reply With Quote #4

Quote:
Originally Posted by EpicMonkey View Post
you're still active
yup. as long as my pc doesn't break again. pm me if you want to continue this convo
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 05-27-2013 , 08:46   Re: get_msg_block
Reply With Quote #5

Quote:
Originally Posted by v3x View Post
as long as my pc doesn't break again
I know how you felt
__________________
Jhob94 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 13:30.


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