doIf() syntax error on Gatling 2.3.1 - doif is not a member of io.gatling.core.structure.ChainBuilder

Hello,

I have the following source code. I’ve spent a lot of time reviewing the gatling docs and online code examples, and I believe my code to be syntactically correct.

The problem here is that it says .doIf() is not even a valid function

All the code is here: 1error.log · GitHub

Versions

Using docker image: denvazh/gatling:2.3.1 - denvazh/gatling - Docker Image

  • This is built with Scala 2.12.
  • ENV GATLING_VERSION 2.3.1

Error

[ERROR] i.g.c.ZincCompiler$ - /opt/gatling/user-files/simulations/SupervisionSimulation.scala:58: value doif is not a member of io.gatling.core.structure.ChainBuilder possible cause: maybe a semicolon is missing before `value doif’?

.

Can someone please help? I’m completely stuck. Thanks!

value doif is not a member

Capital I