[rules-users] Problem with modify sentence
Kevin Alonso
kalonso at vicomtech.org
Mon Jun 8 02:54:52 EDT 2009
Hi Luis,
The whole error message is the following:
BuildError: Unable to build expression for 'consequence': Failed to
compile: 1 compilation error(s):
- (1,16) unqualified type in strict mode for: - ' modify ( rules
) { allowedGuesses -= 1 }
System.out.println( "Write a Letter:");
br = new BufferedReader( new InputStreamReader( System.in ) );
l = br.readLine().toUpperCase();
System.out.println( l );
System.out.println( guess.guessedWord);
guess.sayOneLetter(l);
System.out.println( guess.guessedWord);
System.out.println( guess.letters);
' hangman.drl Hangman/src/main/rules line 44 Drools Error
The rule code:
rule "Letter"
ruleflow-group "Letter"
no-loop
when
rules : GameRules( allowedGuesses > 0 )
guess : GuessedWord()
then
modify ( rules ) { allowedGuesses -= 1 }
System.out.println( "Write a Letter:");
br = new BufferedReader( new InputStreamReader( System.in ) );
l = br.readLine().toUpperCase();
System.out.println( l );
System.out.println( guess.guessedWord);
guess.sayOneLetter(l);
System.out.println( guess.guessedWord);
System.out.println( guess.letters);
end
Thank you,
Kevin
Luis Silva escribió:
> Hi Kevin, What is the error that you are getting?
>
> On Fri, Jun 5, 2009 at 2:47 AM, Kevin Alonso <kalonso at vicomtech.org
> <mailto:kalonso at vicomtech.org>> wrote:
>
> Hi all,
>
> I get a compilation error in a "then" part of the rule with the
> next sentence:
>
> modify ( rules ) { allowedGuesses -= 1 }
>
> This problem has appeared after update from 5.0 CR1 to Drools
> 5.0 final version.
>
> Is it a bug?
>
> Thank you,
>
> Kevin.
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> --
> Luis Enrique Silva Valdivieso
> Cel. 00 51 1 991546707
> Casa 00 51 1 4476616
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list