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

error 017: undefined symbol "client"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mozzie4k
Junior Member
Join Date: Sep 2020
Old 05-16-2021 , 05:58   error 017: undefined symbol "client"
Reply With Quote #1

I am trying to change a plugin (not mine) and i struggle to figure out how can i make it work
iClient gives a value that looks like this name<2><STEAM_1:1:XXXXXXXX><>
What i want is to replace it with just a nick name but i can't figure out how GetClientName work
coz i get error 017: undefined symbol "client" error.

PHP Code:
    int iAccountID hParams.GetObjectVar(116ObjectValueType_Int);
    
int iClient GetClientFromAccountID(iAccountID);
    
char Name[32];
    
GetClientName(clientNamesizeof(Name));

    if(
iClient != -1)
    {    
        
int iDefIndex hParams.GetObjectVar(120ObjectValueType_Int);
        
int iPaintIndex hParams.GetObjectVar(124ObjectValueType_Int);
        
int iRarity hParams.GetObjectVar(128ObjectValueType_Int);
        
int iQuality hParams.GetObjectVar(132ObjectValueType_Int);
        
        
LogToFile(g_sLogFile"Player %L got [%u-%u-%u-%u]"iClientiDefIndexiPaintIndexiRarityiQuality);
    } 

Last edited by Mozzie4k; 05-16-2021 at 05:58.
Mozzie4k is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 05-16-2021 , 06:01   Re: error 017: undefined symbol "client"
Reply With Quote #2

If you just want their name instead of name<X><Y><Z>, change %L to %N in your LogToFile call.

As for the error, your variable is called iClient, not client.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 05-16-2021 at 06:11.
DJ Tsunami is offline
Mozzie4k
Junior Member
Join Date: Sep 2020
Old 05-16-2021 , 06:14   Re: error 017: undefined symbol "client"
Reply With Quote #3

Quote:
Originally Posted by DJ Tsunami View Post
If you just want their name instead of name<X><Y><Z>, change %L to %N in your LogToFile call.
Could you tell me where i can read a difference between %N and %L or what are they called ???
Mozzie4k is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 05-16-2021 , 06:21   Re: error 017: undefined symbol "client"
Reply With Quote #4

Sure, here you go: https://wiki.alliedmods.net/Format_C...mat_Specifiers
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Mozzie4k
Junior Member
Join Date: Sep 2020
Old 05-16-2021 , 06:29   Re: error 017: undefined symbol "client"
Reply With Quote #5

Quote:
Originally Posted by DJ Tsunami View Post
You are savior Thank you very much.
Mozzie4k 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 09:58.


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