Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String Arrays?
Fearlessagent Offline
Junior Member

Posts: 12
Threads: 2
Joined: Jul 2012
Reputation: 1
#1
String Arrays?

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: (Select All)
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: (Select All)
    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.
(This post was last modified: 08-13-2012, 09:43 PM by Fearlessagent.)
08-13-2012, 08:10 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: String Arrays?

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: (Select All)
string[] name = {"value1""value2" /* ... */}; 

Tutorials: From Noob to Pro
08-13-2012, 09:06 PM
Website Find
Fearlessagent Offline
Junior Member

Posts: 12
Threads: 2
Joined: Jul 2012
Reputation: 1
#3
RE: String Arrays?

(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: (Select All)
string[] name = {"value1""value2" /* ... */}; 
Thanks, works perfectly.
08-13-2012, 09:43 PM
Find




Users browsing this thread: 1 Guest(s)