April 23, 2024, 12:20:21 PM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Forum rules
-
please read before posting, it can save you a lot of time.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Packaging a txt. file
« previous
next »
Pages: [
1
]
Print
Author
Topic: Packaging a txt. file (Read 2655 times)
0 Members and 1 Guest are viewing this topic.
Amo
Supporter
Regular poster
Karma: 0
Offline
Gender:
Posts: 206
Packaging a txt. file
«
on:
June 21, 2007, 10:15:47 PM »
Hi there,
following thing, we read some txt files out with additional text information for the player, for something like an diary. This runs perfect in debug mode, but when compiling it, it doesn't work and gives out a [null].
Is it not possible to put the txt files in a package? Or do we need a workaround?
Logged
www.sunrisethegame.com
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Packaging a txt. file
«
Reply #1 on:
June 22, 2007, 09:19:04 AM »
It should be possible. In what way exactly are you using the text file in your scripts?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Amo
Supporter
Regular poster
Karma: 0
Offline
Gender:
Posts: 206
Re: Packaging a txt. file
«
Reply #2 on:
June 22, 2007, 12:46:50 PM »
function Hilfetext_ON()
{
var TextFile = new File("txt\hilfe\hilfe_" + story + ".txt");
TextFile.OpenAsText(1);
helpscreen = PDAWin.GetWidget("helpscreen");
helpscreen.Text = TextFile.ReadText(TextFile.Length);
TextFile.Close();
helpscreen.AlphaColor = MakeRGBA(255, 255, 255, 0);
}
Thats the way how they get loaded. The "txt" is the packagefolder, the rest of the path are subfolders.
Logged
www.sunrisethegame.com
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Packaging a txt. file
«
Reply #3 on:
June 22, 2007, 01:00:13 PM »
If 'txt' is the name of the package, it shouldn't be included in the path when referencing the file. That's the cause of your problem.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Amo
Supporter
Regular poster
Karma: 0
Offline
Gender:
Posts: 206
Re: Packaging a txt. file
«
Reply #4 on:
June 22, 2007, 05:35:33 PM »
Thanks, it works now.
Logged
www.sunrisethegame.com
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Packaging a txt. file