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

[INC] nVault Utility


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-15-2014 , 14:11   Re: [INC] nVault Utility
Reply With Quote #21

You can't, you are simply getting the entry location in the vault, not the order/ranking or whatever you are trying to do. There is no sorting taking place. You will need to read all entries into something and then sort. See the above post.
__________________

Last edited by Bugsy; 04-15-2014 at 14:12.
Bugsy is offline
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 04-16-2014 , 05:10   Re: [INC] nVault Utility
Reply With Quote #22

Quote:
Originally Posted by Bugsy View Post
You can't, you are simply getting the entry location in the vault, not the order/ranking or whatever you are trying to do. There is no sorting taking place. You will need to read all entries into something and then sort. See the above post.
Bugsy are back ? :O :X
swapped is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-16-2014 , 08:34   Re: [INC] nVault Utility
Reply With Quote #23

Not full time anymore but I get notification via email of subscribed threads and pm's. I browse forums occasionally too.
__________________
Bugsy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-13-2015 , 16:16   Re: [INC] nVault Utility
Reply With Quote #24

Update posted for addition of the below functions:

nvault_set_array() - Save an array to vault.
nvault_get_array() - Read an array from vault.

These functions use the vault id returned from nvault_open(), NOT the vault id returned from nvault_util_open().
__________________

Last edited by Bugsy; 02-13-2015 at 16:17.
Bugsy is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 02-14-2015 , 19:31   Re: [INC] nVault Utility
Reply With Quote #25

Quote:
Originally Posted by Bugsy View Post
Update posted for addition of the below functions:

nvault_set_array() - Save an array to vault.
nvault_get_array() - Read an array from vault.

These functions use the vault id returned from nvault_open(), NOT the vault id returned from nvault_util_open().
I guess the include is bugged and you need to fix it.

A person got this errors when he compiled this new include with my plugin.
With the old include it works fine

Code:
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : error 017: undefined symbol "BUFFER_SIZE"
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : error 009: invalid array size (negative or zero)
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : error 036: empty statement
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : fatal error 107: too many error messages on one line
This is my plugin:
https://forums.alliedmods.net/showthread.php?t=235101
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 02-14-2015 at 19:31.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-14-2015 , 19:39   Re: [INC] nVault Utility
Reply With Quote #26

Quote:
Originally Posted by ironskillz1 View Post
I guess the include is bugged and you need to fix it.

A person got this errors when he compiled this new include with my plugin.
With the old include it works fine

Code:
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : error 017: undefined symbol "BUFFER_SIZE"
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : error 009: invalid array size (negative or zero)
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : error 036: empty statement
...\...\addons\amxmodx\scripting\include\nvault_util.inc(67) : fatal error 107: too many error messages on one line
This is my plugin:
https://forums.alliedmods.net/showthread.php?t=235101
Should be fixed now, thank you for reporting.
__________________
Bugsy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-11-2015 , 11:13   Re: [INC] nVault Utility
Reply With Quote #27

Update:
  • Added nvault_util_read_array() and nvault_util_readall_array() functions. These function the same way as nvault_util_read() and nvault_util_read_all(), except they are for reading arrays opposed to string values.
  • Code optimization in nvault_get_array(). This also fixed an issue where the function may not have been returning the correct number of array items that were read.
  • Added optional timestamp parameter to nvault_get_array(). Previously there was no way to get the timestamp of an array entry.
__________________
Bugsy is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 11-18-2016 , 05:42   Re: [INC] nVault Utility
Reply With Quote #28

Bugsy, you should also add coments inside of INC file, even if the threads already contain, i like more to read from the inc itself

Edit: Btw, why i "can't" open vault files with nvault ? When i'm using nvault utility i cannot open vault files with nvault editor, why?
__________________
Project: Among Us

Last edited by Craxor; 11-18-2016 at 06:15.
Craxor is offline
Send a message via ICQ to Craxor
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-18-2016 , 21:55   Re: [INC] nVault Utility
Reply With Quote #29

What type of comments?

It is probably because the file is open by another process so the OS blocks it.
__________________
Bugsy is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 11-19-2016 , 08:29   Re: [INC] nVault Utility
Reply With Quote #30

Quote:
Originally Posted by Bugsy View Post
What type of comments?

Exactly like in the thread, params informations.


I'm doing corectly what i'm doing with nvault utility ?

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <nvault>
#include <nvault_util>

enum _:PlayerData
{
    
kills,
    
deaths,
    
Money
};

const 
MAX_PLAYERS 32;
new 
pDataMAX_PLAYERS ] [PlayerData];

new const 
VName[ ] = "VaultUtilityTest";
new 
VaultId;

new 
gName[32][33];

public 
plugin_init( )
{
    
register_plugin"Nvault Utility Test""1.0""Craxor" );

    
register_clcmd"say /insert""ins" );
    
register_clcmd"say /check""check" );    

    
VaultId nvault_openVName );
}

public 
client_putinserverid )
{
    
get_user_nameidgName[id], charsmaxgName[] ) );
}

public 
client_infochangedid )
{
    
get_user_infoid"name"gName[id], charsmaxgName[] ) );
}

public 
insid )
{
    
pData[id][kills] = get_user_fragsid );
    
pData[id][deaths] = cs_get_user_deathsid );
    
pData[id][Money] = cs_get_user_moneyid );

    
nvault_set_arrayVaultIdgName[id] , pDataid ], sizeof (pData[]) );
}

public 
checkid )
{
    
    
nvault_get_arrayVaultIdgName[id] , pData[id], sizeofpData[] ) );

    
client_printidprint_chat" Name : %s "gName[id] );
    
client_printidprint_chat" Info: %i , %i, %i"pData[id] [kills], pData[id] [deaths], pData[id] [Money] );

__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
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 01:46.


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