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

Quick fix, type mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hedgemon
Junior Member
Join Date: May 2017
Old 06-27-2017 , 14:27   Quick fix, type mismatch
Reply With Quote #1

What did I do wrong here?

Error is last line of code segment.
error 035: argument type mismatch (argument 2)




Code:
int Target = FindTarget(client, arg1);
	if(Target == -1)
	{
		ReplyToCommand(client, "Cannot target player");
		return Plugin_Handled;
	}
	
	char name[32], steamid[32], adminname[32], time[30];
	Format(time, sizeof(time), "%d/%m,%Y, %H:%M:%S", GetTime());
	GetClientName(client, adminname, 32);
	GetClientName(Target, name, 32);
	GetClientAuthId(Target, steamid, 32);

Last edited by Hedgemon; 06-27-2017 at 14:28.
Hedgemon is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 06-27-2017 , 14:30   Re: Quick fix, type mismatch
Reply With Quote #2

Try looking at the docs for GetClientAuthId: https://sm.alliedmods.net/new-api/cl...etClientAuthId
i.e.:
GetClientAuthId(Target, AuthId_Engine, steamid, 32);

Last edited by Mitchell; 06-27-2017 at 14:31.
Mitchell is offline
Hedgemon
Junior Member
Join Date: May 2017
Old 06-27-2017 , 14:32   Re: Quick fix, type mismatch
Reply With Quote #3

AuthId_Steam3 is this the best one to use?
Hedgemon is offline
0xBatuhan
Member
Join Date: Dec 2016
Location: Turkey
Old 06-27-2017 , 14:49   Re: Quick fix, type mismatch
Reply With Quote #4

Quote:
Originally Posted by Hedgemon View Post
AuthId_Steam3 is this the best one to use?

AuthId_Steam2 -> ex "STEAM_1:1:4153990"
AuthId_Steam3 -> ex "[U:1:8307981]"
AuthId_SteamID64 -> A SteamID64 (uint64) as a String, ex "76561197968573709" (It is usually used)

Last edited by 0xBatuhan; 06-27-2017 at 14:50.
0xBatuhan 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 13:03.


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