Difference between revisions of "User:JT/Master "In" Pile"

From SimsWiki
Jump to: navigation, search
(Created page with "== Script modding errors and solutions == === No suitable method to override when creating a new interaction === ; '''PROBLEM''' : 'YourNamespace.YourInteractionName.Definit...")
 

Latest revision as of 00:44, 2 February 2013

[edit] Script modding errors and solutions

[edit] No suitable method to override when creating a new interaction

PROBLEM
'YourNamespace.YourInteractionName.Definition.Test(Sims3.Gameplay.Actors.Sim, Sims3.Gameplay.Actors.Sim, bool, ref Sims3.SimIFace.GreyedOutTooltipCallback)': no suitable method found to override
	public class InteractionInRabbithole : Interaction<Sim, RabbitHole>
	{
		[DoesntRequireTuning]
		private sealed class Definition : InteractionDefinition<Sim, RabbitHole, InteractionInRabbithole>
		{
			protected override bool Test(Sim actor, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) {
				return false;
				}
		}
	}
Solution
Your object types in Test() don't agree with the parameters of the Interaction<> template. For instance, this Test() function will only work for an Interaction<Sim, Sim>, so it fails because it appears in an Interaction<Sim, RabbitHole>. The Test() function's second Sim parameter (target) should be changed to a RabbitHole object type. This trap is easy to fall into if you copy-and-paste working interactions and forget to update the object types of your parameters.
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox