Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-13 Thread Wolfgang Laun
If you rely heavily on enums, you might consider using a userfunction that binds enum constants to Jess variables - so you don't need the parentheses. http://www.jessrules.com/jesswiki/view?BindEnumUserFunction -W On 12/03/2012, Friedman-Hill, Ernest ejfr...@sandia.gov wrote: The Jess language

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-13 Thread Wolfgang Laun
The posted error message still puzzles me. My recollection has it that Jess reports quite accurately the statement where the exception was raised, not just the outermost control statement. Moreover, all levels between the outermost and innermost statement are displayed as well, so that you can

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-12 Thread Wolfgang Laun
Are you sure that (?*bwapi* getMyUnits) returns a list? Jess' foreach isn't quite as tolerant as for in Java 1.5 and later. You may have to return an java.util.iterator. -W On 10/03/2012, Hunter McMillen mcmil...@gmail.com wrote: I am receiving the error in the subject line when one of my

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-12 Thread Hunter McMillen
Thanks for your response Wolfgang, Yes, getMyUnits() returns an ArrayListUnit; I don't believe this likely to be the problem since I have these in other rules that are functioning. More debugging shows that the error is occurring in routine Value.stringValue. Do you see anywhere where I am trying

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-12 Thread Jason Morris
The other place that it might be is in the line (if (= (call ?u getTypeID) ?*SCV_ID*) then ... because the = function does a comparison by *value*, so it would likely use Value.getValue(). What do your ID's look like? Are they numbers or strings, or something else? If they are strings, then

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-12 Thread Hunter McMillen
Here is the stacktrace: Message: '' is a list, not a string. at jess.Value.a(Unknown Source) at jess.Value.a(Unknown Source) at jess.Value.a(Unknown Source) at jess.Value.stringValue(Unknown Source) at jess.Value.symbolValue(Unknown Source) at

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-12 Thread Hunter McMillen
That was exactly the problem, thanks. What is the general rule for function calling in Jess, always without parentheses? I never would have caught that error because when I see something like get-next-build-tile() the parentheses tell me it is a function. Seeing it without the parens makes me

Re: JESS: [EXTERNAL] Jess exception: ' ' is a list, not a string

2012-03-12 Thread Jason Morris
Good gravy! This is one of those can't see the forest through the trees examples that we used to collect on the jess wiki! It was hiding in plain sight! One lesson from this is that Jess's error messages, even when seemingly cryptic, contain some useful clues. Users, myself included, are too