Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Confession with Questions too

 
Post new topic   Reply to topic Printable version
 View previous topic  Python and AS3 Post :: Post sqlite database library  View next topic  
Author Message
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sat Dec 30, 2006 3:57 pm    Post subject: Confession with Questions too Reply to topic Reply with quote

Ok I make all my modules in python but the methods I use are not good ones when I store data to files. Right now I have it so that it stores data in individual player files, but invaild file names come up.

I know this is a horrible way of doing it. I need some code to help me.

I need to be able to store something in this format in rank.txt

Name:Money:Exp:Rank
I.E: BDwinsAlt:5000:20:1

I need to be able to write it when they leave and read it when they enter.
Please help me get this working, I would hate for some players to have to change their name.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sat Dec 30, 2006 6:11 pm    Post subject: Reply to topic Reply with quote

Wouldn't it be better to use mysql for storage of such things?
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sat Dec 30, 2006 6:18 pm    Post subject: Reply to topic Reply with quote

I was thinking of doing mysql, I guess ill give it a try.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:38
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Dec 31, 2006 6:55 am    Post subject: Reply to topic Reply with quote

Uh, you should've been able to figure this out by reading one of your last topics: "Custom datafile. Calling back data and storing it.".

But yes, using some database-ish or any other more convenient way should be the way to go with.
Back to top
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Jan 01, 2007 12:03 am    Post subject: Reply to topic Reply with quote

Thanks for redirecting me Solo. I finally understand how that works, I tweaked it a little bit for my own reasons, it's awesome man thanks so much. This may be why the zone crashes, I had a bunch of txt files trying to open and close and I fixed some other things that caused error messages.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Mon Jan 01, 2007 7:39 pm    Post subject: Reply to topic Reply with quote

This is exactly what the persistent data feature was designed for. You should try using that. It'll be much easier than managing your own database stuff.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Thu Jan 04, 2007 8:19 pm    Post subject: Reply to topic Reply with quote

Is there any way to access the data externally? With mysql for example, you would be able to display everything on a website if you wanted to.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Thu Jan 04, 2007 9:37 pm    Post subject: Reply to topic Reply with quote

Yes I was using the same database to use web-based alias on my website. I decided to just use 1 file anyways. Everything is working, but I may try databases later on for other things.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 29 page(s) served in previous 5 minutes.

phpBB Created this page in 0.451080 seconds : 33 queries executed (88.0%): GZIP compression disabled