Raised This Month: $ Target: $400
 0% 

nVault help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
atambo
Senior Member
Join Date: Oct 2004
Location: Pittsburgh, PA
Old 09-02-2005 , 21:08   nVault help
Reply With Quote #1

I'm getting a warning with the nvault_lookup function...I'm not exactly sure how to check by key and see if an entry is already there...the warning says: "warning 202: number of arguments does not match definition" will this still work with the warning or am I using it wrong?

Code:
public client_authorized(id) {     new vaultid = nvault_open("credits")     new authid[32], vault_time[21]     get_user_authid(id,authid,31)     if(nvault_lookup(vaultid,authid)!=0) <---look here     {         vault_time = nvault_get(vaultid,authid,20)         connecttime[id] = str_to_num(vault_time)     }     else     {         connecttime[id] = numnewcredits * credittime         num_to_str(connecttime[id],vault_time,20)         nvault_set(vaultid,authid,vault_time)     }     nvault_close(vaultid)     return PLUGIN_CONTINUE }

I'm also getting an error with the nvault_get function...I'm not exactly sure how to use this now compared to the old vault way...the error is saying: "error 033: array must be indexed <variable "vault_time">"

Code:
public client_disconnect(id) {     new vaultid = nvault_open("credits")     Armor[id] = 0     Health[id] = 0     Speed[id] = 0     Gravity[id] = 0     Stealth[id] = 0     hpstlr[id] = 0     regeneration[id] = 0     weapontraining[id] = 0     jumpmodule[id] = 0     climb[id] = 0     promotion[id] = 0     gHasuammo[id] = 0     sshoe[id] = 0     wired[id] = 0     esp[id] = 0     laser[id] = 0     sgrenade[id] = 0     crowbar[id] = 0     itemcap[id] = 0     creditsspent[id] = 0     lastplaytime[id] = 0     remove_task(id)     new authid[32]     new playtime = (get_user_time(id) - lastplaytime[id])     get_user_authid(id,authid,31)     new tmp_vault_time,vault_time[21]     vault_time = nvault_get(vaultid,authid,20) <---look here     tmp_vault_time = str_to_num(vault_time)     tmp_vault_time += playtime     num_to_str(tmp_vault_time,vault_time,20)     nvault_set(vaultid,authid,vault_time)     nvault_close(vaultid)     return PLUGIN_CONTINUE }
__________________
atambo is offline
Send a message via AIM to atambo Send a message via MSN to atambo Send a message via Yahoo to atambo
 



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 14:21.


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