Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Targeting problem in commands #610

Open
daffyyyy opened this issue Oct 6, 2024 · 0 comments
Open

Targeting problem in commands #610

daffyyyy opened this issue Oct 6, 2024 · 0 comments
Labels
untriaged New issue has not been triaged

Comments

@daffyyyy
Copy link

daffyyyy commented Oct 6, 2024

We can target by @ or nickname, we can also use #userid, #steamid64 and #STEAM.
The problem is with targeting by steamid (both), only #userid works and #steamid64/#steam returns an error

Trying to find the target by

var matches = command.GetArgTargetResult(1);
15:22:32 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'id')
   at CounterStrikeSharp.API.Modules.Entities.SteamID..ctor(UInt64 id) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Entities/SteamID.cs:line 13
   at CounterStrikeSharp.API.Modules.Entities.SteamID.op_Explicit(UInt64 u) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Entities/SteamID.cs:line 19
   at CounterStrikeSharp.API.Modules.Commands.Targeting.Target.TargetPredicate(CCSPlayerController player, CCSPlayerController caller) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Commands/Targeting/Target.cs:line 112
   at System.Linq.Enumerable.WhereListIterator`1.ToList()
   at CounterStrikeSharp.API.Modules.Commands.Targeting.Target.GetTarget(CCSPlayerController caller) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Commands/Targeting/Target.cs:line 123
@github-actions github-actions bot added the untriaged New issue has not been triaged label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

1 participant