Raised This Month: $ Target: $400
 0% 

[RESOLVED] Invalid function call, not a valid address (this plugin doesnt like me)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-02-2010 , 01:14   [RESOLVED] Invalid function call, not a valid address (this plugin doesnt like me)
Reply With Quote #1

Code:
public say_help(id)
{
	new name[33]
	get_user_name(id,name,32)
	new arg1[129]
	read_argv(1,arg1,128)
	remove_quotes(arg1)
	if(containi(arg1,"!") != -1)
	{
		replace(arg1,128,"!","")
		new arg2[65]
		read_argv(2,arg2,64)
		if(equali(arg2,"") != -1)
		{
			if(equali(arg1,"health"))
			{
				client_print(id,print_chat,"[OK] You have %d Health %s",name,g_health[id])
			}
			else if(equali(arg1,"bank"))
			{
				client_cmd(id,"amx_bloodbank")
			}
			else if(equali(arg1,"blood"))
			{
				client_print(id,print_chat,"[OK] %s, You have %d Blood",name,g_bhealth[id])
			}
			else if(equali(arg1,"bankhelp"))
			{
				client_print(id,print_chat,"[OK] Bloodbank is a new sub-plugin for overkill.")
				client_print(id,print_chat,"[OK] say !bank to access the banking menu, say !blood to see your blood level, and say !health to see your health")
			}
			else if(containi(arg1,"bank"))
			{
				if(containi(arg2,"help"))
				{
					client_print(id,print_chat,"[OK] Bloodbank is a new sub-plugin for overkill.")
					client_print(id,print_chat,"[OK] say !bank to access the banking menu, say !blood to see your blood level, and say !health to see your health")
				}
			}
			else if(containi(arg1,"blood") != -1 && (containi(arg2,"") == -1))
			{
				new players[32], pnum, tempid;
				new szName[32]
				get_players(players, pnum);
				for( new i; i<pnum; i++ )
				{
					tempid = players[i];
					get_user_name(tempid, szName, 31);					
					client_print(id,print_chat,"[OK] %s has %d Blood",szName,g_bhealth(tempid))
				}
			}
			
			else if(containi(arg1,"health") != -1 && (containi(arg2,"") == -1))
			{
				if(!is_user_admin(id))
				{
					client_print(id,print_chat,"[OK] You have no access to view someones health this way, just ask them")
					return PLUGIN_HANDLED
				}
				else if(is_user_admin(id))
				{
					new players[32], pnum, tempid;
					new szName[32]
					get_players(players, pnum);
					for( new i; i<pnum; i++ )
					{
						tempid = players[i];
						get_user_name(tempid, szName, 31);
						client_print(id,print_chat,"[OK] %s has %d Health",szName,g_health[tempid])
					}
				}
				
			}
			
		}
		
	}
	
}
erm... what am I doing wrong?

changed my method from this, to using several new public functions (code "duplicated" from Pinfo)
__________________
+|- KARMA Respectively


Last edited by HLM; 05-02-2010 at 02:19.
HLM 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 16:11.


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