Frictional Games Forum (read-only)
String Arrays? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: String Arrays? (/thread-17742.html)



String Arrays? - Fearlessagent - 08-13-2012

Are they possible in Amnesia? Looking at the AngelScript documentation (well the google cache anyways, site seems to be down at the time of me writing this), is says the syntax is something like:

PHP Code:
array<stringname = {"string1","string2"

However, when I do this, I get an error: main (145, 14): ERR: Expected '('

Just to be clear, 145 is the line where I am declaring the array, the exact line is:
PHP Code:
    array<stringsound = {"29_wind.snt""general_wind_blow.snt""scare_wind.snt""scare_wind_reverse.snt"}; 

Also, if there's a better way to accomplish what I'm trying to do, let me know.


RE: String Arrays? - Your Computer - 08-13-2012

The AngelScript documentation has been updated to fit the latest version of AngelScript. Amnesia, however, uses an older version of AngelScript, therefore requires different syntax.

The proper way is
PHP Code:
string[] name = {"value1""value2" /* ... */}; 



RE: String Arrays? - Fearlessagent - 08-13-2012

(08-13-2012, 09:06 PM)Your Computer Wrote: The AngelScript documentation has been updated to fit the latest version of AngelScript. Amnesia, however, uses an older version of AngelScript, therefore requires different syntax.

The proper way is
PHP Code:
string[] name = {"value1""value2" /* ... */}; 
Thanks, works perfectly.