Jump to page content
English English   Polish Polish   Dutch Dutch   Russian Russian   German German   Hungarian Hungarian   Norwegian Norwegian   Swedish Swedish   Finnish Finnish   Romanian Romanian   Spanish Spanish   Portuguese Portuguese   Latvian Latvian  
Homepage
Home
Register
Login

Resources
Forum
Wiki
Servers

rssDataManager (datamanager)

Category:script
Author(s):churchill
Downloads:766
Rate:You need to be logged in to vote
Rating:3.7 (9 Votes)
Description:
This is mainly a replacement for the buggy getAccountData/setAccountData, but can also be used for storing data against other objects as well. Data can be stored in SQL or XML, which is configurable by the admin user using a console command (/datamanager XML or /datamanager SQL, while logged in as admin.)

This might be useful to anyone who wants to do simple data storage along the lines of getAccountData/setAccountData without the fear of losing data when the server shuts down, but can't be bothered creating their own SQL Lite or XML system.

When in XML storage mode, there are no checks to ensure your object and keys are named in a valid way for XML, so just don't do it! I know I should add some validation on the data being entered to ensure it doesn't happen, but for now just read up on XML element naming rules to find out what the rules are, or leave it in SQL mode :)

if you have any bug reports or suggestions, feel free to post in here or comment on the resource in the resource library.

Available exported functions (also available in HTTP):

getData(objectid, key)
returns false if an object/key can't be found, or a string value if it can.

setData(objectid, key, value)
returns false if the value couldn't be added/updated, or true if successful.

removeData(objectid,key)
returns false if the key could not be removed, or true if successful.

More info including example usage can be found at the forum thread here (http://forum.mtasa.com/viewtopic.php?f=91&t=23424) or in the readme.txt file that accompanies the resource.

Please post bug reports or suggestions in here or in the thread :)
...

(more)

Download latest version | Report

Version history

Version Publish Date Changes
0.9.0 2008-08-15 02:59:26 First public release Download