Is there anyway to convert a Win32 database over to UNIX-readable format, even if by hand?
Database blues
Posted by Tidalwv on Sat 22 Sep 2001 06:30 PM — 11 posts, 33,985 views.
They should be directly compatible, excepting perhaps the line endings. In the PennMUSH section of the Downloads page (see button at top of page) are utilities for converting from Unix to DOS (or vice-versa) line endings.
The file converters I assume?
The answer is probably painfully obvious, but how would I use it? Temporarily make the database a .txt file, place it in the directory of the program, then run the program?
The answer is probably painfully obvious, but how would I use it? Temporarily make the database a .txt file, place it in the directory of the program, then run the program?
Put the program somewhere in your path (eg. C:\WINDOWS), then open a "Dos" window. Change to the "game\data" directory and type:
(or replace INDB by OUTDB or whatever is appropriate).
Alternatively, if you "ftp" the file over to your Unix PC, using "text" translation mode, the translation will be done for you automatically.
DOS2UNIX INDB
(or replace INDB by OUTDB or whatever is appropriate).
Alternatively, if you "ftp" the file over to your Unix PC, using "text" translation mode, the translation will be done for you automatically.
there is also another handy way, all you do is load your database file through WS-ftp, and then save it again.
hope that helps.
Vanne
hope that helps.
Vanne
Okay, I'm still having troubles, but this time I come with the error messages from the log file:
11/01 08:47:44 Reading alias.cnf
11/01 08:47:44 Reading restrict.cnf
11/01 08:47:44 CONFIG: directive 'exit_flags' missing from cnf file, using default value.
11/01 08:47:44 ANALYZING: data/indb
stdin: not in compressed format
11/01 08:47:44 ANALYZING: data/indb (done)
11/01 08:47:44 LOADING: data/indb
stdin: not in compressed format
11/01 08:47:44 ERROR: failed object 0
11/01 08:47:44 ERROR LOADING
11/01 08:47:44 ERROR: Couldn't load databases! Exiting.
Can somebody help?
11/01 08:47:44 Reading alias.cnf
11/01 08:47:44 Reading restrict.cnf
11/01 08:47:44 CONFIG: directive 'exit_flags' missing from cnf file, using default value.
11/01 08:47:44 ANALYZING: data/indb
stdin: not in compressed format
11/01 08:47:44 ANALYZING: data/indb (done)
11/01 08:47:44 LOADING: data/indb
stdin: not in compressed format
11/01 08:47:44 ERROR: failed object 0
11/01 08:47:44 ERROR LOADING
11/01 08:47:44 ERROR: Couldn't load databases! Exiting.
Can somebody help?
In your file mush.cnf you may need to fiddle with the compression options. Since the error message is "not in compressed format" try making the compression options blank, like this:
# Use these 3 lines for no compression. Required on win32.
compress_program
uncompress_program
compress_suffix
I changed the compression stuff, and now I'm getting these errors:
11/04 22:20:48 ANALYZING: data/indb
11/04 22:20:48 ANALYZING: data/indb (done)
11/04 22:20:48 LOADING: data/indb
11/04 22:20:48 ERROR: Bad character 1 (49) in attribute list on object 0
11/04 22:20:48 (expecting ], >, or < as first character of the line.)
11/04 22:20:48 No attributes had been read yet.
11/04 22:20:48 ERROR: bad attribute list object 0
11/04 22:20:48 ERROR LOADING
11/04 22:20:48 ERROR: Couldn't load databases! Exiting.
11/04 22:20:48 ANALYZING: data/indb
11/04 22:20:48 ANALYZING: data/indb (done)
11/04 22:20:48 LOADING: data/indb
11/04 22:20:48 ERROR: Bad character 1 (49) in attribute list on object 0
11/04 22:20:48 (expecting ], >, or < as first character of the line.)
11/04 22:20:48 No attributes had been read yet.
11/04 22:20:48 ERROR: bad attribute list object 0
11/04 22:20:48 ERROR LOADING
11/04 22:20:48 ERROR: Couldn't load databases! Exiting.
There is something weird about your database, possibly caused by the line endings. Try listing the first 20 lines and see if they look reasonable (eg. edit them in vi on Unix, and Notepad on Windows and make sure they look the same). You shouldn't see any "funny" characters (like ^M) when you edit the file.
If you can't work it out post the first 20 lines here.
If you can't work it out post the first 20 lines here.
Here's the #0 object. I couldn't catch anything wacky.
+V1047554
~242
!0
"Plaza <OOC World>"
-1
104
214
-1
-1
1
235
0
32768
0
0
0
986325975
1002051375
]DESCRIBE^4^66080
"%r[ansi(hy, --------------------------------------------------------------------------------)]%r%tA fairly large, open-aired plaza, decorated Spanish style. Various places branch off, providing information about the gameworld, or a place to just OOCly hang out. Cheesy theme park music plays in the background while costumed characters wander about, depicting important people in the gameworld.%r%r%t[ansi(hw, Places to go:)]%r%t[ansi(hc, <)][ansi(hg, M)][ansi(hc, > )] [ansi(hg, Museum)]: See examples of people from social classes and professions.%r%t[ansi(hc, <)][ansi(hg, CC)][ansi(hc, > )] [ansi(hg, Cast and Crew)]: See the in-game NPCs and the staff.%r%t[ansi(hc, <)][ansi(hg, R)][ansi(hc, >)] [ansi(hg, Regester)]: Apply for a character. GUESTS: Logoff and at the login screen, create a character with the name you want before you proceede here.%r%t[ansi(hc, <)][ansi(hg, E)][ansi(hc, >)] [ansi(hg, Examples)]: Examples to help if you were going to have a home built, or other things like that. Gives examples of basic things and allows you to expand for your purposes.%r%t[ansi(hr, RP)]: Takes you to the gameworld. [ansi(hr, !RP)]: Will bring you back here.%r[ansi(hy, --------------------------------------------------------------------------------)]%r"
<
+V1047554
~242
!0
"Plaza <OOC World>"
-1
104
214
-1
-1
1
235
0
32768
0
0
0
986325975
1002051375
]DESCRIBE^4^66080
"%r[ansi(hy, --------------------------------------------------------------------------------)]%r%tA fairly large, open-aired plaza, decorated Spanish style. Various places branch off, providing information about the gameworld, or a place to just OOCly hang out. Cheesy theme park music plays in the background while costumed characters wander about, depicting important people in the gameworld.%r%r%t[ansi(hw, Places to go:)]%r%t[ansi(hc, <)][ansi(hg, M)][ansi(hc, > )] [ansi(hg, Museum)]: See examples of people from social classes and professions.%r%t[ansi(hc, <)][ansi(hg, CC)][ansi(hc, > )] [ansi(hg, Cast and Crew)]: See the in-game NPCs and the staff.%r%t[ansi(hc, <)][ansi(hg, R)][ansi(hc, >)] [ansi(hg, Regester)]: Apply for a character. GUESTS: Logoff and at the login screen, create a character with the name you want before you proceede here.%r%t[ansi(hc, <)][ansi(hg, E)][ansi(hc, >)] [ansi(hg, Examples)]: Examples to help if you were going to have a home built, or other things like that. Gives examples of basic things and allows you to expand for your purposes.%r%t[ansi(hr, RP)]: Takes you to the gameworld. [ansi(hr, !RP)]: Will bring you back here.%r[ansi(hy, --------------------------------------------------------------------------------)]%r"
<
Judging by the source code the bad character is literally the number "1". I can't see why it is saying that. I can only suggest you zip up the first few hundred lines of the database and email it to me so I can see why it is saying that.
eg. do something like this:
This will compress the first 200 lines into "nick.gz" which you can then email to me.
eg. do something like this:
head -200 indb | gzip -c > nick.gz
This will compress the first 200 lines into "nick.gz" which you can then email to me.