Hi All,

I've been hacking at a project for a couple weeks now, and am getting some 
rather confusing array-related errors when trying to compile.

I've seen these before, but they usually only occur when trying to use objects 
with nondefault constructors in arrays in some fashion.

In this case, its a method declaration line that seems to be breaking:



item[] lookup(string keyword)

The error is:



File: array

On line: 0 (0)

Error: The subtype has no default factory

File: 

On line: 20 (1)

Information: Compiling <unknown> database::lookup(string)



The item class is fully valid and included in the script.

The lookup function is as follows:



item[] lookup(string keyword)

//This function returns a list of items that can be referenced by a given 
keyword.

{

item[] results;//Note that this line doesn't break, just the function 
declaration

for(int count=0; count<contents.length(); count++)//loop through database 
contents, checking each item

{

if(contents[count].check(keyword)) results.insert_last(contents[count]);

}

return results;

}



If anybody has a clue what's going on here, I'd really appreciate some help.

Also, if you know how to use objects that have constructors with arguments in 
arrays, I'd love to know too; that particular issue has been costing me a 
tremendous amount of debugging and fixing time.



Thanks,

John
---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to