ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Is it possible to evaluate a calculation in a restriction?

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.

Is it possible to evaluate a calculation in a restriction?

Postby DazaKiwi » Mon Mar 09, 2020 1:50 am

So i have an expression in restrictions like this (%number% + %CarryResourceTally%) !> %MaxCarryLimit%
This is for a task where the player will enter a number they want to harvest. But in testing It fails the restriction when it shouldn't, as the input number is 2 and CarryResourceTally is 5 and the MaxCarryLimit is 8.

If this cannot be evaluated like this is there another way i can do it without having to create a second task?
User avatar
DazaKiwi
 
Posts: 743
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 61

Re: Is it possible to evaluate a calculation in a restrictio

Postby saabie » Mon Mar 09, 2020 3:14 am

What's the !> supposed to do? != is not equal but there is no !> listed in the wiki. If you want not greater than then use <= for less than or equal.
saabie
 
Posts: 1024
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: Is it possible to evaluate a calculation in a restrictio

Postby DazaKiwi » Mon Mar 09, 2020 3:48 am

saabie wrote:What's the !> supposed to do? != is not equal but there is no !> listed in the wiki. If you want not greater than then use <= for less than or equal.


Oh i thought that was legit lol i thought that was like 'is not greater than' ok i will <= instead. Thanks.
User avatar
DazaKiwi
 
Posts: 743
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 61


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 3 guests

cron