ID:160637
 
In my game got a several external .txt files which I'm using as lists, using Deadron's Text Handling library function "file2list". It all works fine when I compile the code and run it through Dream Maker, but when I uploaded the packaged files to the hub and tried to run it, none of the lists were apparently accessed. For instance the random names didn't appear. Here's the code for accessing the lists:

proc
LoadNames(directory="data/")
var/list/male_name = dd_file2list("[directory]male_names.txt")
var/list/female_name = dd_file2list("[directory]female_names.txt")
var/list/surname = dd_file2list("[directory]last_names.txt")
var/list/weapons = dd_file2list("[directory]weapon_types.txt")
var/list/materials = dd_file2list("[directory]material_types.txt")
var/list/idle = dd_file2list("[directory]idle_messages.txt")


The files are contained in the games directory in the Byond folder in a folder named "data", and the LoadNames proc is called in World.New().

Can anyone shed some light on this, please?
Single quotes ('X') searches for the file and compiles it in the RSC for future use in the game.

When you use double quotes ("X"), it searches for the file in the given location - but it is not added to the RSC.

So when you uploaded the package file, the said directory was not included thus when it tried looking for the files in "[X]", it couldn't find it simply because that host did not have that specific directory+files.
In response to GhostAnime
Ah, thanks a bunch :)
To add to this -- you need to Build Package like normal, but specify the files in your data/ directory in addition. Or you can open the resulting .zip file and add the files manually before uploading it to your hub.
In response to Android Data
Note that not if you use single quotes instead, then it's automatically packaged as part of the rsc. Looks like he doesn't actually need the directory var, and could well use a #define instead.