Skip to content
View in the app

A better way to browse. Learn more.

Learn more

CASE statement

Featured Replies

And me again. I tried using a case statement in my script, eg:

30·20·10·3·(L:XMLVAR_BoostFuelPump,·number)·case·(>L:DEADBEEF)

I would expect it to be something along the lines like this

switch XMLVAR_BoostFuelPump {

case 0:

DEADBEEF = 10

case 1:

DEADBEEF = 20

case 2:

DEADBEEF = 30

}

This works quite well for XMLVAR_BoostFuelPump 1 and 2, if it is 0 however, I get 0 returned, not 10. What am I doing wrong? From reading the SDK documentation the syntax should be correct.

[values] [# of cases] Variable case

 

any help is appreciated

  • Commercial Member
20 hours ago, Deimos said:

This works quite well for XMLVAR_BoostFuelPump 1 and 2, if it is 0 however, I get 0 returned, not 10. What am I doing wrong? From reading the SDK documentation the syntax should be correct.

[values] [# of cases] Variable case

 

any help is appreciated

That is a bug. Will be corrected in 2.09. 

LORBY-SI

  • Author

Awesome, thank you very much for the swift reply and the workaround. Work held me up today, but I will have a look at it this weekend 🙂

Archived

This topic is now archived and is closed to further replies.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.