我相信我在这一个上的语法是正确的,但是由于某种原因,anura ffl解析器无法识别第二个标识符。
choice
在我的WHERE子句中定义。我错过了什么?
def(class creature creature, class game_state game) ->commands [
if(creature.choices,
if(choice < size(player.deck), [
set(player.deck, player.deck[0:choice] + player.deck[choice+1:]),
game.crypt.spawn_cards(creature.summoner, [card]),
set(creature.effects_tracking['Buried Treasure'], card),
] where card=player.deck[choice]
) where player=game.players[creature.summoner],
choice=creature.choices[0]
),
]
它给了我这个错误:
formula.cpp:1067 ASSERTION FAILED: Unknown identifier 'choice' :
if(choice < size(player.deck), [
^-----^
注:如果我把它改成
where a=... where b=...
而不是
where a=... , b=...
然后分析。