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

[CS:GO] Error compiling.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Oieamm
Member
Join Date: Aug 2018
Old 08-17-2018 , 09:49   [CS:GO] Error compiling.
Reply With Quote #1

I'm having trouble compiling a plugin connection.
I have the code, but when I compile it gives an error:

th_conexao.sp (47): warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId

I'll leave the code to help me.

Thank you.
-

#include <sourcemod>
#include <geoip>
#include <colors>

public Plugin:myinfo =
{
name = "[CS:GO/CSS] Londrina Pro League Stats",
author = "MMYTH e AbNeR @CSB",
description = "Mensagens quando o player conecta/disconecta.",
version = "2.0",
url = "http://www.tecnohardclan.com/"
};


public OnClientPutInServer(client)
{
decl String:name[128];
decl String:steamid[128];
decl String:ip[128];
decl String:country[128];

GetClientName(client, name, sizeof(name));
CPrintToChatAll("{green}[Londrina Pro League] {default}Jogador: {green}%s", name);

GetClientAuthString(client, steamid, sizeof(steamid));
CPrintToChatAll("{green}[Londrina Pro League] {default}SteamID: {green}%s", steamid);

GetClientIP(client, ip, sizeof(ip), false);//Para aparecer o IP, retire as duas barras abaixo
CPrintToChatAll("{green}[Londrina Pro League] {default}IP: {green}%s", ip);

if(GeoipCountry(ip, country, sizeof(country)))
{
CPrintToChatAll("{green}[Londrina Pro League] {default}País: {green}%s", country);
}
else
{
CPrintToChatAll("{green}[Londrina Pro League] {default}País: {green}Indefinido.");
}
}

public OnClientDisconnect(client)
{
decl String:name[128];
decl String:steamid[128];

GetClientName(client, name, sizeof(name));
GetClientAuthString(client, steamid, sizeof(steamid));

CPrintToChatAll("{green}[Londrina Pro League] {default}O jogador {green}%s {olive}Steam: %s{default} desconectou-se.", name, steamid);
}
Oieamm is offline
beastedout
Member
Join Date: Aug 2018
Old 08-17-2018 , 10:16   Re: [CS:GO] Error compiling.
Reply With Quote #2

Use old sourcemod compiler
beastedout is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 08-17-2018 , 10:20   Re: [CS:GO] Error compiling.
Reply With Quote #3

This thread belongs in scripting.

Regardless...

Do as you're told:
"symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId"
mug1wara is offline
Oieamm
Member
Join Date: Aug 2018
Old 08-17-2018 , 10:53   Re: [CS:GO] Error compiling.
Reply With Quote #4

Quote:
Originally Posted by mug1wara View Post
This thread belongs in scripting.

Regardless...

Do as you're told:
"symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId"
I switched to GetClientAuthId now with this error:

//// th_conexao.sp
//
// th_conexao.sp(25) : error 035: argument type mismatch (argument 2)
// th_conexao.sp(25) : error 035: argument type mismatch (argument 3)
// th_conexao.sp(47) : error 035: argument type mismatch (argument 2)
// th_conexao.sp(47) : error 035: argument type mismatch (argument 3)
//
// 4 Errors.
Oieamm is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 08-17-2018 , 11:38   Re: [CS:GO] Error compiling.
Reply With Quote #5

GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));

https://sm.alliedmods.net/new-api/cl...etClientAuthId

By the way, if you're just getting the client's name and using it in a text, just use %N along with passing the client as the index. You don't need to use GetClientName() for that.

Example:

PrintToChat(client, "My name is: %N", client);

Output: My name is: Oieamm
__________________

Last edited by Psyk0tik; 08-17-2018 at 11:43.
Psyk0tik is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-17-2018 , 13:18   Re: [CS:GO] Error compiling.
Reply With Quote #6

If you are only getting warnings it should still compile
__________________
8guawong is offline
Oieamm
Member
Join Date: Aug 2018
Old 08-17-2018 , 13:28   Re: [CS:GO] Error compiling.
Reply With Quote #7

Quote:
Originally Posted by Crasher_3637 View Post
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));

https://sm.alliedmods.net/new-api/cl...etClientAuthId

By the way, if you're just getting the client's name and using it in a text, just use %N along with passing the client as the index. You don't need to use GetClientName() for that.

Example:

PrintToChat(client, "My name is: %N", client);

Output: My name is: Oieamm


thank you very much !!!!!

Compiled perfectly with the change, I'll test it on the server today.

Oieamm 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 10:53.


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