Raised This Month: $12 Target: $400
 3% 

Need some help with this


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nubbe
Junior Member
Join Date: Sep 2021
Old 09-05-2021 , 17:42   Need some help with this
Reply With Quote #1

i cant seem to figure out why this gives me errors

Code:
	
        char Target[64];
	char cl[32];
	GetCmdArg(1, Target, sizeof(Target));
	GetCmdArg(2, cl, sizeof(cl));

	char target_name[MAX_TARGET_LENGTH];
	int target_list[MAXPLAYERS], target_count;
	bool tn_is_ml;
 
	if ((target_count = ProcessTargetString(
			Target,
			client,
			target_list,
			MAXPLAYERS,
			COMMAND_FILTER_CONNECTED,
			target_name,
			sizeof(target_name),
			tn_is_ml)) <= 0)
	{
		void ReplyToTargetError (int client, int target_count)
		return Plugin_Handled;
	}
And it gives these errors when i compile
test.sp(53) : warning 219: local variable "ReplyToTargetError" shadows a variable at a preceding level
test.sp(53) : error 001: expected token: ";", but found "("
test.sp(53) : error 029: invalid expression, assumed zero
test.sp(53) : error 029: invalid expression, assumed zero
test.sp(53) : fatal error 190: too many error messages on one line

Last edited by Nubbe; 09-05-2021 at 18:13.
Nubbe is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 09-05-2021 , 17:46   Re: Need some help with this
Reply With Quote #2

Change this:
PHP Code:
void ReplyToTargetError (int clientint target_count
To this:
PHP Code:
ReplyToTargetError(clienttarget_count); 
__________________
Psyk0tik is offline
Nubbe
Junior Member
Join Date: Sep 2021
Old 09-05-2021 , 17:49   Re: Need some help with this
Reply With Quote #3

But isnt that old syntax ? because it works with that and when i then compile it, it doesnt give a replytotargeterror in chat ingame

And gives these errors in console

Code:
L 09/05/2021 - 23:51:37: [SM]   [0] ReplyToCommand
L 09/05/2021 - 23:51:37: [SM]   [1] Line 102, C:\Users\xxxxxDesktop\xxxxx\csgo\addons\sourcemod\scripting\include\commandfilters.inc::ReplyToTargetError
L 09/05/2021 - 23:51:37: [SM]   [2] Line 53, test.sp::Command_SetCT

Last edited by Nubbe; 09-05-2021 at 17:55. Reason: adding stuff
Nubbe is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 09-05-2021 , 17:56   Re: Need some help with this
Reply With Quote #4

Quote:
Originally Posted by Nubbe View Post
But isnt that old syntax ? because it works with that and when i then compile it, it doesnt give a replytotargeterror in chat ingame

And gives these errors in console

Code:
L 09/05/2021 - 23:51:37: [SM]   [0] ReplyToCommand
L 09/05/2021 - 23:51:37: [SM]   [1] Line 102, C:\Users\xxxxxDesktop\xxxxx\csgo\addons\sourcemod\scripting\include\commandfilters.inc::ReplyToTargetError
L 09/05/2021 - 23:51:37: [SM]   [2] Line 53, test.sp::Command_SetCT
The usage is still the same in both old and new syntax. You're confusing the function prototype with how it's used in actual code.

You need to post the full stack trace for that error if you want help. It's hard to tell what the error is without the "Exception reported" line.
__________________

Last edited by Psyk0tik; 09-05-2021 at 17:58.
Psyk0tik is offline
Nubbe
Junior Member
Join Date: Sep 2021
Old 09-05-2021 , 18:09   Re: Need some help with this
Reply With Quote #5

L 09/06/2021 - 00:03:08: "whattadoggo<2><STEAM_1:0:105693675><CT>" say "!setct nubbe surf"
L 09/06/2021 - 00:03:08: [SM] Exception reported: Language phrase "No matching client" not found (arg 4)
L 09/06/2021 - 00:03:08: [SM] Blaming: test.smx
L 09/06/2021 - 00:03:08: [SM] Call stack trace:
L 09/06/2021 - 00:03:08: [SM] [0] ReplyToCommand
L 09/06/2021 - 00:03:08: [SM] [1] Line 102, C:\Users\xxxxx\Desktop\xxx\csgo\addons\source mod\scripting\include\commandfilters.inc::Rep lyToTargetError
L 09/06/2021 - 00:03:08: [SM] [2] Line 54, test.sp::Command_SetCT
Nubbe is offline
Nubbe
Junior Member
Join Date: Sep 2021
Old 09-05-2021 , 18:13   Re: Need some help with this
Reply With Quote #6

I figured it out im stupid nvm Thank you very much dude
Nubbe is offline
Nubbe
Junior Member
Join Date: Sep 2021
Old 09-05-2021 , 18:13   Re: Need some help with this
Reply With Quote #7

Fixed with adding
Code:
public void OnPluginStart()
{
	RegAdminCmd("sm_setct", Command_SetCT, ADMFLAG_SLAY, "Set players clan tag");
	LoadTranslations("common.phrases");
}
Nubbe is offline
Reply


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 06:57.


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