Report post

Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.

Users reporting for no reason may be locked out.


Post

Posted by Toni R
on
This is my code, just copy/paste from the up code:

using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Entity; 

namespace Scripts
{
public class Script
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
value = ((IDriver)value).Car.Movement.Rpm;
value = (int)value / 50 * 50;
return value.ToString();
}
}
}


I'm thinking.... Must I to change this line "value = ((IDriver)value).Car.Movement.Rpm;" to "value = ((RPM)value).Car.Movement.Rpm;" for the code to work???