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.
Emmanuel Suter wrote:
Try this on the top of your script (only if and return, the top is to show you were put it){
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
if (value == null)
{
return null;
}
We met this problem with others and it solve.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data.Results;
namespace Scripts
{
public class Script : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var result = value as IEntitySessionResult;
if (result == null)
return null;
if (result.DidNotStart == true)
return "DNS";
if (result.Out == true)
return "DNF";
if (result.Entity.Car.Movement.IsInPits == true)
return "PIT";
if (result.Finished == true)
return "FINISH";
return "";
}
}
}