ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Bad Expression...yet still outputs properly

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Bad Expression...yet still outputs properly

Postby DazaKiwi » Thu Jun 22, 2017 3:18 am

I have some tasks that are called and uses the # %character% etc, the parameters for the task that called them in the parameter uses %Player%.Location.Characters (if i use Character it throws an error).

So when i reference the character passed on through the parameters, in the output i have %character%.Name, but it gives me an error BadExpression characterkey.name, yet it still correctly outputs the name like it should. I am guessing the reason it is saying bad expression is because i used .Characters not .character in the parameters. But if i drop the S, the error becomes object not set to reference etc.

So how do i get around this. In short i'm rounding up all characters present in players location, and then the called tasks with # %character% has restrictions to filter them down. As stated it outputs the characters name properly, so i don't quite understand why its a bad expression?? i tried changing it to # %characters% but change.
User avatar
DazaKiwi
 
Posts: 480
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Bad Expression...yet still outputs properly

Postby saabie » Thu Jun 22, 2017 7:31 am

%Player%.Location.Characters is correct to pass the list of characters as a parameter.
The called task should use %character% everywhere, not %characters%
The restrictions should use [Referenced Character] not [Referenced Characters]
This worked when I tested it.
Are you sure the error is not hiding inside one of the restrictions?
saabie
 
Posts: 834
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 5 guests

cron