Raised This Month: $ Target: $400
 0% 

Nvault Load Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wgwgkg
Member
Join Date: May 2011
Old 08-10-2012 , 02:14   Nvault Load Problem
Reply With Quote #1

I got a problem about nvault load.For example:

If A Player run a Load function, sometimes may load the data from B Player.[I don't know how to say this.]

A Player has $50, B Player has $100. Sometimes when A Player Load his data $50, he maybe get B Player data $100. So A Player suddently get more 50$.

This is my Load and Save code. Can anyone tell me why will this happen and how to fix it PLZZZZZZ!
PHP Code:
public Savegun(id)
{
         new 
name[35], vaultkey[64], vaultdata[256]
         
get_user_name(idname34)
         
format(vaultkey63"%s"name)
         
format(vaultdata255"%i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i"
         
g_gun[id][0],g_gun[id][1],g_gun[id][2],g_gun[id][3],g_gun[id][4],g_gun[id][5],g_gun[id][6],g_gun[id][7],g_gun[id][8],g_gun[id][9],g_gun[id][10],g_gun[id][11],g_gun[id][12],g_gun[id][13], g_gun[id][14], g_gun[id][15], g_gun[id][16], g_gun[id][17], g_gun[id][18], g_gun[id][19], g_gun[id][20], g_gun[id][21], g_gun[id][22], g_gun[id][23], g_gun[id][24], g_gun[id][25])
         
nvault_set(g_vaultvaultkeyvaultdata)
         return
}

new 
data[32][32]
public 
Loadgun(id)
{
    new 
vaultkey[33], vaultdata[256]
    
get_user_name(id,vaultkey,charsmaxvaultkey ) )
    
nvault_get(g_vaultvaultkeyvaultdatacharsmax(vaultdata))
    
    
replace_all(vaultdata255"#"" "//Line 1772  
    
parse(vaultdatadata[0], 31data[1], 31data[2], 31data[3], 31data[4], 31data[5], 31data[6], 31 data[7], 31data[8], 31data[9], 31data[10], 31data[11], 31data[12], 31data[13], 31data[14], 31data[15], 31data[16], 31data[17], 31data[18], 31data[19], 31data[20], 31data[21], 31data[22], 31data[23], 31data[24], 31data[25], 31)
    
    for (new 
026i++)
        
g_gun[id][i] = str_to_num(data[i])

Sorry for my bad English , I hope i can find a problem!
wgwgkg is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-10-2012 , 02:19   Re: Nvault Load Problem
Reply With Quote #2

I've already seen that post somewhere...

Oh there http://forums.alliedmods.net/showthread.php?t=192009
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-10-2012 at 02:19.
ConnorMcLeod is offline
wgwgkg
Member
Join Date: May 2011
Old 08-10-2012 , 02:36   Re: Nvault Load Problem
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
I've already seen that post somewhere...

Oh there http://forums.alliedmods.net/showthread.php?t=192009
This Post is different from that post
wgwgkg is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-10-2012 , 12:12   Re: Nvault Load Problem
Reply With Quote #4

why are you using multidimensional arrays?...
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
wgwgkg
Member
Join Date: May 2011
Old 08-11-2012 , 00:00   Re: Nvault Load Problem
Reply With Quote #5

Quote:
Originally Posted by Napoleon_be View Post
why are you using multidimensional arrays?...
It's becasue it will be more easy to do anything
wgwgkg is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-11-2012 , 00:46   Re: Nvault Load Problem
Reply With Quote #6

Quote:
Originally Posted by wgwgkg View Post
It's becasue it will be more easy to do anything
like doing what? explain
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
SPT1
Senior Member
Join Date: Aug 2012
Old 08-11-2012 , 07:42   Re: Nvault Load Problem
Reply With Quote #7

nvault sucks
use sqlx
SPT1 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-11-2012 , 13:46   Re: Nvault Load Problem
Reply With Quote #8

Quote:
Originally Posted by SPT1 View Post
nvault sucks
use sqlx
Why does it suck?
__________________
Bugsy is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-11-2012 , 14:00   Re: Nvault Load Problem
Reply With Quote #9

Quote:
Originally Posted by SPT1 View Post
nvault sucks
use sqlx
Depend what you want to do...
guipatinador is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 08-11-2012 , 14:31   Re: Nvault Load Problem
Reply With Quote #10

i check played time by alka
it doesn't shows top15 players who is offline
and sqlx is good in everywhere
try to create something for sql
http://forums.alliedmods.net/showthread.php?t=66657

Last edited by SPT1; 08-11-2012 at 14:32.
SPT1 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 05:48.


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