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

EventHook Warning: tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
)v(aster
Junior Member
Join Date: Feb 2008
Old 04-06-2008 , 17:24   EventHook Warning: tag mismatch
Reply With Quote #1

Hi, i'm trying to remove the text which says a player joins. When I try and run "return plugin_handled", I get a warning error, does not occur if i just use "return" (but obviously still prints the message).

Code:
 
HookEvent("player_connect",PlayerCon,EventHookMode_Pre);
 
public PlayerCon(Handle:event,const String:name[],bool:dontBroadcast)
{
 if (!GetConVarInt(g_hConnectAnnounce))
  return;
 
 new String:playername[35]
 
 GetEventString(event,"name",playername,35);
 
 PrintToChatAll("My Version: %s connected",playername)
 
 return;
}
It reports the following warning on the return lines if i use "return Plugin_Handled":

warning 213: tag mismatch

I'm very new to this.

Thanks
Lee
)v(aster is offline
BAILOPAN
Join Date: Jan 2004
Old 04-06-2008 , 17:32   Re: EventHook Warning: tag mismatch
Reply With Quote #2

Change it to:

Code:
public Action:PlayerCon(Handle:event,const String:name[],bool:dontBroadcast)

And you can use Plugin_Handled. Note that Action has no effect on Post hooks, but since you've got a Pre hook it looks okay.
__________________
egg
BAILOPAN is offline
)v(aster
Junior Member
Join Date: Feb 2008
Old 04-06-2008 , 17:51   Re: EventHook Warning: tag mismatch
Reply With Quote #3

Thanks Baliopan
)v(aster 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 15:27.


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