AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   error 017: undefined symbol "client" (https://forums.alliedmods.net/showthread.php?t=332499)

Mozzie4k 05-16-2021 05:58

error 017: undefined symbol "client"
 
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);
    } 


DJ Tsunami 05-16-2021 06:01

Re: error 017: undefined symbol "client"
 
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.

Mozzie4k 05-16-2021 06:14

Re: error 017: undefined symbol "client"
 
Quote:

Originally Posted by DJ Tsunami (Post 2746947)
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 ???

DJ Tsunami 05-16-2021 06:21

Re: error 017: undefined symbol "client"
 
Sure, here you go: https://wiki.alliedmods.net/Format_C...mat_Specifiers

Mozzie4k 05-16-2021 06:29

Re: error 017: undefined symbol "client"
 
Quote:

Originally Posted by DJ Tsunami (Post 2746952)

You are savior :) Thank you very much.


All times are GMT -4. The time now is 22:44.

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