AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Nvault Load Problem (https://forums.alliedmods.net/showthread.php?t=192421)

wgwgkg 08-10-2012 02:14

Nvault Load Problem
 
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!

ConnorMcLeod 08-10-2012 02:19

Re: Nvault Load Problem
 
I've already seen that post somewhere...

Oh there http://forums.alliedmods.net/showthread.php?t=192009

wgwgkg 08-10-2012 02:36

Re: Nvault Load Problem
 
Quote:

Originally Posted by ConnorMcLeod (Post 1768269)
I've already seen that post somewhere...

Oh there http://forums.alliedmods.net/showthread.php?t=192009

This Post is different from that post:nono:

Napoleon_be 08-10-2012 12:12

Re: Nvault Load Problem
 
why are you using multidimensional arrays?...

wgwgkg 08-11-2012 00:00

Re: Nvault Load Problem
 
Quote:

Originally Posted by Napoleon_be (Post 1768526)
why are you using multidimensional arrays?...

It's becasue it will be more easy to do anything

Napoleon_be 08-11-2012 00:46

Re: Nvault Load Problem
 
Quote:

Originally Posted by wgwgkg (Post 1768962)
It's becasue it will be more easy to do anything

like doing what? explain

SPT1 08-11-2012 07:42

Re: Nvault Load Problem
 
nvault sucks
use sqlx

Bugsy 08-11-2012 13:46

Re: Nvault Load Problem
 
Quote:

Originally Posted by SPT1 (Post 1769145)
nvault sucks
use sqlx

Why does it suck?

guipatinador 08-11-2012 14:00

Re: Nvault Load Problem
 
Quote:

Originally Posted by SPT1 (Post 1769145)
nvault sucks
use sqlx

Depend what you want to do...

SPT1 08-11-2012 14:31

Re: Nvault Load Problem
 
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


All times are GMT -4. The time now is 05:48.

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