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

[TUT] nVault Top 15


Post New Thread Reply   
 
Thread Tools Display Modes
Meelo
Member
Join Date: Aug 2010
Old 08-01-2019 , 16:09   Re: [TUT] nVault Top 15
Reply With Quote #11

* Your rank is 4
* Your rank is 5
* Your rank is 116


it gave 3 messages and my rank is 10 in top so it';s not working

Last edited by Meelo; 08-01-2019 at 18:08.
Meelo is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-01-2019 , 19:01   Re: [TUT] nVault Top 15
Reply With Quote #12

Quote:
Originally Posted by Meelo View Post
* Your rank is 4
* Your rank is 5
* Your rank is 116


it gave 3 messages and my rank is 10 in top so it';s not working
Above code is fixed.

Here's a combined code with top 15 and rank
Spoiler
__________________

Last edited by Bugsy; 08-01-2019 at 22:02.
Bugsy is offline
Meelo
Member
Join Date: Aug 2010
Old 08-03-2019 , 14:58   Re: [TUT] nVault Top 15
Reply With Quote #13

O! Thanks everything is ok
Meelo is offline
Meelo
Member
Join Date: Aug 2010
Old 08-19-2019 , 11:42   Re: [TUT] nVault Top 15
Reply With Quote #14

I have question, what if the there is a guy without steamid? how is he saved in nvault? because i have problem with records in top15 - first in top is guy without steam and his stats are way bigger than others. The second problem is - sometimes steam players are getting those stats and they're saved as 2,3 position in top

Is it true that all ns are saved as STEAM_ID_LAN in nvault and those stats are from all those ns players?> (i mean stats which are first in top15)

if so, how to solve this?

Last edited by Meelo; 08-19-2019 at 11:43.
Meelo is offline
thEsp
BANNED
Join Date: Aug 2017
Old 08-19-2019 , 11:59   Re: [TUT] nVault Top 15
Reply With Quote #15

Quote:
Originally Posted by Meelo View Post
I have question, what if the there is a guy without steamid? how is he saved in nvault? because i have problem with records in top15 - first in top is guy without steam and his stats are way bigger than others. The second problem is - sometimes steam players are getting those stats and they're saved as 2,3 position in top

Is it true that all ns are saved as STEAM_ID_LAN in nvault and those stats are from all those ns players?> (i mean stats which are first in top15)

if so, how to solve this?
Steam servers are only supported here.

Last edited by thEsp; 08-19-2019 at 13:33.
thEsp is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-19-2019 , 14:46   Re: [TUT] nVault Top 15
Reply With Quote #16

Quote:
Originally Posted by Meelo View Post
I have question, what if the there is a guy without steamid? how is he saved in nvault? because i have problem with records in top15 - first in top is guy without steam and his stats are way bigger than others. The second problem is - sometimes steam players are getting those stats and they're saved as 2,3 position in top

Is it true that all ns are saved as STEAM_ID_LAN in nvault and those stats are from all those ns players?> (i mean stats which are first in top15)

if so, how to solve this?
The solution is extremely simple: remove dproto and do not allow non steam clients to join.
__________________
HamletEagle is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 11-19-2019 , 06:57   Re: [TUT] nVault Top 15
Reply With Quote #17

Whats wrong ?

Code:
 L 11/19/2019 - 12:40:18: [AMXX] Plugin ("stats.amxx") is setting itself as failed.
L 11/19/2019 - 12:40:18: [AMXX] Plugin says: [nVault Array] Can only use nvault_get_array() on data that was saved using nvault_set_array().
L 11/19/2019 - 12:40:18: [AMXX] Displaying debug trace (plugin "stats.amxx")
L 11/19/2019 - 12:40:18: [AMXX] Run time error 1: forced exit 
L 11/19/2019 - 12:40:18: [AMXX]    [0] nvault_array.inc::nvault_get_array (line 107)
L 11/19/2019 - 12:40:18: [AMXX]    [1] stats.sma::client_authorized (line 55)
stats.sma
PHP Code:
enum PlayerData
{
    
PlayerName[32],
    
kills,
    
deaths,
    
damage,
    
hits
}

public 
client_authorized(id)
{
    if ( !( 
g_BotOrHLTVid ] = bool:( is_user_botid ) || is_user_hltvid ) ) ) )
    {
        
get_user_authididg_AuthIDid ], charsmaxg_AuthID[] ) )
        
nvault_get_arrayg_Vault g_AuthIDid ] , pdDataid ][ PlayerData:] , sizeofpdData[] ) ); // This is line 55
    
}
}

public 
client_disconnect(id)
{
    if( !
g_BotOrHLTVid ])
    {
        
get_user_nameid pdDataid ][ PlayerName ], charsmaxpdData[][ PlayerName ] ) )
        
nvault_set_arrayg_Vault g_AuthIDid ] , pdDataid ][ PlayerData:] , sizeofpdData[] ) );
    }

Didnt use nvault_set, or get. I did it like the tutorial

Last edited by ZaX; 11-19-2019 at 06:58.
ZaX is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-19-2019 , 08:42   Re: [TUT] nVault Top 15
Reply With Quote #18

PlayerData:0

What's that?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-19-2019 , 08:50   Re: [TUT] nVault Top 15
Reply With Quote #19

OciXCrom, it's needed to make the compiler happy when working with enumerator sized arrays.

This is the issue. Your vault contains regular and array records. If this vault file was previously used for other purposes that used regular vault records, you need to delete it and start fresh. A vault can contain both types of records, but for a given key, it should be either regular data or array data.
Code:
L 11/19/2019 - 12:40:18: [AMXX] Plugin says: [nVault Array] Can only use nvault_get_array on data that was saved using nvault_set_array().
__________________

Last edited by Bugsy; 11-19-2019 at 17:52.
Bugsy is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 11-21-2019 , 06:38   Re: [TUT] nVault Top 15
Reply With Quote #20

Quote:
Originally Posted by Bugsy View Post
OciXCrom, it's needed to make the compiler happy when working with enumerator sized arrays.

This is the issue. Your vault contains regular and array records. If this vault file was previously used for other purposes that used regular vault records, you need to delete it and start fresh. A vault can contain both types of records, but for a given key, it should be either regular data or array data.
Code:
L 11/19/2019 - 12:40:18: [AMXX] Plugin says: [nVault Array] Can only use nvault_get_array on data that was saved using nvault_set_array().
No, I didnt use the vault for other purposes, I even tried to change the name of the vault and store the data again and its still the same
ZaX 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 19:19.


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