SimHub Functions

DND

Stay Safe, Healthy and be Kind - Stop Hate
Post here if you need help, or can provide it, to write functions within SimHub.
I'll start.
Goal:
Leaderboard last lap time will change color based on previous and best lap. 'A' would be my personal lap time and is what the formula is based on.

I created a formula in Excel I know works, I just need help in how to make it work in ncalc for SimHub
=IFS(LAST LAP=PREVIOUS LAP,"Yellow",LAST LAP<BEST LAP,"Purple",LAST LAP>PREVIOUS LAP,"Red",LAST LAP<PREVIOUS LAP,"Green")

I have tried this:
if([CurrentLapTime]<[BestLapTime],PURPLE,if([CurrentLapTime]<[LastLapTime],Green,if([CurrentLapTime]>[LastLapTime],Red,Yellow)))

And this:
if([CurrentLapTime]<[BestLapTime],PURPLE,[CurrentLapTime]<[LastLapTime],Green,[CurrentLapTime]>[LastLapTime],Red,Yellow)

Not having much luck with either so some help is required, please.
1618681233963.png
 
Last edited:

Latest News

What would make you race in our Club events

  • Special events

    Votes: 14 23.0%
  • More leagues

    Votes: 13 21.3%
  • Prizes

    Votes: 11 18.0%
  • Trophies

    Votes: 7 11.5%
  • Forum trophies

    Votes: 5 8.2%
  • Livestreams

    Votes: 11 18.0%
  • Easier access

    Votes: 38 62.3%
  • Other? post your reason

    Votes: 8 13.1%
Back
Top