Raised This Month: $ Target: $400
 0% 

"custom" vault


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-24-2004 , 20:38   "custom" vault
Reply With Quote #1

Hello.

I have a few plugins that work together and all store data in the vault. Therefore, the vault file gets very large, and I've heard it takes longer to get the data you are looking for because it takes longer to seek. Also, it's hard for the admins to look through there and see what is what. So, I want to store different data in different files.

Could anyone supply me with a bit of code to how I might recreate the vault functions, except with the option of specifying a specific file to use? I just tried to start but don't feel like messing around with files. :-\

I appreciate it if you'd help, but I don't really expect you to just hand code out. I can figure it out eventually.

Thanks.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 11-24-2004 , 20:53  
Reply With Quote #2

you could use sql tables...
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 11-24-2004 , 21:02  
Reply With Quote #3

http://www.amxmodx.org/funcwiki.php?go=inc&id=3
__________________
twistedeuphoria is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-24-2004 , 21:19  
Reply With Quote #4

Quote:
Originally Posted by devicenull
you could use sql tables...
Although I have much MySQL experience, I am specifically trying to avoid this.

Quote:
Originally Posted by twistedeuphoria
http://www.amxmodx.org/funcwiki.php?go=inc&id=3
I am well aware of the file handling functions. I was just hoping someone would hand over huge blocks of code to me as all of the n00bs expect. I suppose I'll make all my functions myself then.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-25-2004 , 00:29  
Reply With Quote #5

I got everything except how to remove a specific line. Any ideas? My only idea is to remove the file, create it again (so it's cleared), and rewrite every line except the one that you want deleted. This method is pretty flawed.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 11-25-2004 , 02:13  
Reply With Quote #6

Hrm...you could do that or when you're writing to the file check for open slots. Or you could try to print a return and a backspace character to the line though that might not work. (Printing a return to the file will clear the line, I know htat for sure)
__________________
twistedeuphoria is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-25-2004 , 13:18  
Reply With Quote #7

According to the Small manual, \n is a new line and \b is a backspace. So I used ^b (as we use ^n for new line), and it appears as one of those invalid-character boxes instead of going back. Any other ideas?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 11-25-2004 , 15:06  
Reply With Quote #8

Not newline....return (^r) that will clear the line
__________________
twistedeuphoria is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 11-25-2004 , 15:08  
Reply With Quote #9

Ludwig van made his own vault system way back.
Johnny got his gun is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-25-2004 , 22:22  
Reply With Quote #10

Return will create a new line...
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 19:26.


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