Wasn't it Mathuin who wrote:
>I'm trying to use the conditional expression in a function and get the
>following
>error message:
>
>Parse Error: Expected 'operator', ? found instead
>
>Here's my function:
>
>#local ScoreStone = function(x) { (x=1) ? white_stone : black_stone }
>
>What am I doing wrong? I thought ? was an operator -- that's what the
>docs say.
> It happens on Windows with both 3.7 beta 28 and 3.6 as well as on Unix with
>3.6. Thanks!
The syntax inside functions is different from that of the main SDL. It
doesn't have "?" but it does have "select".
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|