Raised This Month: $ Target: $400
 0% 

Load & Save bool problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-04-2013 , 20:30   Load & Save bool problem
Reply With Quote #1

I'm trying to save 2 booleans, but i'm getting 2 warnings and i know i'm doing something wrong but i can't figure out how i should save / load a bool. Someone help me?

iDoublePoints[33]
and
isVIP[33]
are the bools.
code:

PHP Code:
public SaveData(id) {
    new 
SteamID[32]
    
get_user_authid(idSteamIDcharsmax(SteamID))
    
    new 
vaultkey[64], vaultdata[256]
    
    
format(vaultkeycharsmax(vaultkey), "%s-POINTSYSTEM"SteamID)
    
format(vaultdatacharsmax(vaultdata), "%i#%i#%i#"iPoints[id], iDoublePoints[id], isVIP[id])
    
nvault_set(gVaultvaultkeyvaultdata)
    return 
PLUGIN_CONTINUE
}

public 
LoadData(id) {
    new 
SteamID[32]
    
get_user_authid(idSteamIDcharsmax(SteamID))
    
    new 
vaultkey[64], vaultdata[256]
    
    
format(vaultkeycharsmax(vaultkey), "%s-POINTSYSTEM"SteamID)
    
format(vaultdatacharsmax(vaultdata), "%i#%i#%i#"iPoints[id], iDoublePoints[id], isVIP[id])
    
nvault_get(gVaultvaultkeyvaultdatacharsmax(vaultdata))
    
    
replace_all(vaultdatacharsmax(vaultdata), "#"" ")
    
    new 
points[32], doublepoints[32], vip[32]
    
    
parse(vaultdatapointscharsmax(points), doublepointscharsmax(doublepoints), vipcharsmax(vip))
    
    
iPoints[id] = str_to_num(points)
    
iDoublePoints[id] = str_to_num(doublepoints)
    
isVIP[id] = str_to_num(vip)
    
    return 
PLUGIN_CONTINUE

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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 06:27.


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