Raised This Month: $ Target: $400
 0% 

Help with callfunc


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-03-2007 , 15:36   Help with callfunc
#1

Here is my error log text:
Code:
L 01/03/2007 - 13:20:46: Start of error session.
L 01/03/2007 - 13:20:46: Info (map "ts_stuntpath") (logfile "error_010307.log")
L 01/03/2007 - 13:20:46: callfunc_push_xxx called without callfunc_begin
L 01/03/2007 - 13:20:46: [AMXX] Run time error 10 (plugin "RolePlay.amxx") (native "callfunc_push_int") - debug not enabled!
L 01/03/2007 - 13:20:46: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Here is the AMXX code:
PHP Code:
public ItemMenu2(id,Key)
{
 switch(
Key)
 {
  case 
0: {
   
callfunc_begin(ItemCommand[id][UserCurrentItem[id]],"RolePlay.amxx")
   
728. --->callfunc_push_int(id)<---
   
callfunc_end()
   }
  
//case 1: 
  //case 2: 
  //case 3: 
  
case 4client_print(id,print_chat,"%s: %s",ItemName[id][UserCurrentItem[id]],ItemDescription[id][UserCurrentItem[id]])
  case 
7ItemMenuSetup(id
  case 
9: {
    
client_print(id,print_chat,"**You have closed your inventory.")
    
UserMenuPage[id]=0
   
}
 } 
 return 
PLUGIN_HANDLED

If you have any questions as to what is going on in this function, please ask. Also, case 4, case 7, and case 9 work, so it isn't a switchcase problem...

Also, I had the call as: callfunc_begin(ItemCommand[id][UserCurrentItem[id]]), but when I found out it was having problems, I added "RolePlay.amxx" to the end, even though the function I'm calling is in the same plugin as the callfunc, so it shouldn't really make a difference (and didn't). I was just trying things out.

Sorry for posting in the wrong forum.

Last edited by Bad_Bud; 01-03-2007 at 18:58.
Bad_Bud is offline
 


Thread Tools
Display Modes

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 22:30.


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