June 30, 20214 yr 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
July 1, 20214 yr Commercial Member I will look at it. For now I'd suggest a string of if's. Something like this: (L:XMLVAR_FuelBoostPump, Number) s0 l0 0 == if{ 10 } l0 1 == if{ 20 } l0 2 == if{ 30 } (>L:DEADBEEF) LORBY-SI
July 1, 20214 yr 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
July 1, 20214 yr 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.