So I have a part of my code where the player gets to choose between three paths. Once a path is chosen and they return to the passage that path is no longer available, but the other two are. On the third trip through that passage they get only the last choice. For some reason I can't nail down, this code doesn't work.
<<if $d1 eq 0>>[[Take the first path|path1]][[$d1 +=1]]<<endif>>
<<if $d2 eq 0>>[[Take the second path|path2]][[$d2 +=1]]<<endif>>
<<if $d3 eq 0>>[[Take the third path|path3]][[$d3 +=1]]<<endif>>
This code gets me an error :
Error: <<if>>: bad conditional expression: Cannot read property 'search' of undefined
Any thoughts?
Comments
<<if $d1 eq 0>>[[Take the first path|path1]][[$d1 +=1]]<<endif>>
Should be:
<<if $d1 eq 0>>[[Take the first path|path1][$d1 +=1]]<<endif>>