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 Simon Grossmann
on
You are writing "value.ToString()" twice, which accesses the value (your first name) twice. Both firstName and lastName have the same value in your case.
The issue your are describing above is actually a bug in the description. The initials should only have two letters. But there is another way you could access the data you want. You just have to bind to the "driver_object" which is of type IDriver. Then you could return "driver.ThreeLetterCode". The script would look like this:
public class Initialen_Fahrer : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var driver = (IDriver) value;
return driver.ThreeLetterCode;
}
}

I guess we should add this binding as well. No idea why we acutally didn't add it right from the beginning.