Due to increasing spam attacks, forum registrations are currently paused to keep our community safe and spam-free. Come hang out and stay connected with us on the SimHub Discord: https://discord.com/invite/nBBMuX7!

Catch you on Discord — and thanks for understanding!
Dashboard help - co...
 
Notifications
Clear all

Dashboard help - colour change based on tyre compound

2 Posts
2 Users
0 Reactions
1,184 Views
(@mattevans111)
Active Member
Joined: 7 months ago
Posts: 5
Topic starter  

Hi, I'm trying to create a dashboard where the text changes colour based on what tyre compound is on the car.

I started with this below, but in AMS2 the tyre compounds are 'soft slick' rather than 'soft', the issue I then have is that the formula doesnt like the space and I can't work out how to put it in quote marks etc to make it work...

if([GameRawData.mTyreCompound01.value]=soft,'red',if([GameRawData.mTyreCompound01.value]=medium,'yellow',if([GameRawData.mTyreCompound01.value]=hard,'white',if([GameRawData.mTyreCompound01.value]=wet,'aqua','orange'))))

 

any advice much appreciated!

Also if anyone has the full list of tyre compounds incase its a longer list than, soft slick, medium slick, hard slick and wet!



   
Quote
Topic Tags
(@cmteinacio)
Active Member
Joined: 2 years ago
Posts: 7
 

Hi.

Try this:

if ( [GameRawData.mTyreCompound01.value] = 'Soft', 'red ',
if ( [GameRawData.mTyreCompound01.value] = 'Medium', 'yellow',
if ( [GameRawData.mTyreCompound01.value] = 'Hard', 'white',
if ( [GameRawData.mTyreCompound01.value] = 'Inter', 'green',
if ( [GameRawData.mTyreCompound01.value] = 'Wet', 'aqua', 'orange')
)
)
)
)

 

I believe you were comparing it to the lowercase string. For simhub they are different.



   
ReplyQuote
Share:
📄 Terms & Conditions | 📑 Privacy Policy