Raised This Month: $ Target: $400
 0% 

Client Validation problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Androx
Junior Member
Join Date: Sep 2012
Old 02-13-2013 , 11:41   Client Validation problem
Reply With Quote #1

Hello,
Quote:
public Action:Command_DVoice(client, argc)
{
decl String:arg1[MAX_NAME_LENGTH], String:arg2[MAX_NAME_LENGTH];
GetCmdArg(1, arg1, sizeof(arg1));
GetCmdArg(2, arg2, sizeof(arg2));

new receiver = FindTarget(client, arg1);
new sender = FindTarget(client, arg2);

PrintToChat(client, "[DEBUG] GetListenOverride(%N, %N): %d", receiver, sender, GetListenOverride(receiver, sender));

return Plugin_Handled;
}

public Action:Command_DMute(client, argc)
{
decl String:arg1[MAX_NAME_LENGTH], String:arg2[MAX_NAME_LENGTH];
GetCmdArg(1, arg1, sizeof(arg1));
GetCmdArg(2, arg2, sizeof(arg2));

new receiver = FindTarget(client, arg1);
new sender = FindTarget(client, arg2);

if (GetListenOverride(receiver, sender) == Listen_No) {
SetListenOverride(receiver, sender, Listen_Default);
PrintToChat(client, "[DEBUG] %N can hear %N again", receiver, sender);
}
else {
SetListenOverride(receiver, sender, Listen_No);
PrintToChat(client, "[DEBUG] %N can't hear %N anymore", receiver, sender);
}

return Plugin_Handled;
}
I have a little bug in this old script do you know how i can fix that? Here the error_logs

Quote:
L 02/13/2013 - 17:174: [SM] Native "GetListenOverride" reported: Sender client index -1 is invalid
L 02/13/2013 - 17:174: [SM] Displaying call stack trace for plugin "test.smx":
L 02/13/2013 - 17:174: [SM] [0] Line 139, E:\PawnStudio\temp108.sp::Command_DVoice()
L 02/13/2013 - 17:22:44: [SM] Native "GetListenOverride" reported: Receiver client index -1 is
invalid
L 02/13/2013 - 17:22:44: [SM] Displaying call stack trace for plugin "test.smx":
L 02/13/2013 - 17:22:44: [SM] [0] Line 153, E:\PawnStudio\temp108.sp::Command_DMute()
Thanks for help

Sorry for my bad english.

LeXx
Androx 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 11:12.


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