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 Nick Thissen
on
Most likely there is sometimes coming data with unexpected type in the 'value' of the script function, and you try to cast it to IEntitySessionResult while it's actually a Color or string. You should just check the type is correct and if not do nothing. You can do it via the "as" casting like this:
var result = value as IEntitySessionResult;
if (result == null)
{
// it was not type IEntitySessionResult
}