Invalid Call of Datum Operator error in Script Canvas

I am creating a script canvas to validate what my component entity collided:

After retrieving the entity’s name, I want to compare it with a string to determine the correct action. Using the Equal To (==) I get the error Invalid Call of Datum::operator==.

I tried changing both strings to a number (string to number node) as well as two numbers (just to test) but had the same error.
Any suggestions? Am I misusing the Equal To? Should I be using another logic node?

Thanks!

@DocBurton Glad to help! I noticed in your example the ‘get variable 2’ node needs to have its input triggered, placing it directly between the ‘get entitiy name’ node and the equal to will work. There are additional nodes available if open up global preferences in ScriptCanvas (Edit -> Settings -> Global Preferences) and ticking the preview nodes box.

7150-sc-preview-nodes.png

Some nodes may seem to share the same functionality like the example below with get entity name. You may find that one node works when another doesn’t (I’ve only been able to use the starter game version of GetEntityName, for example).

7148-sc-preview-nodes2.png

Thank you @Finite_State, I will try that.

@DocBurton there are a few script canvas examples in the samples project that use a diffferent Equal to node. I’ve had more luck using that one with strings. I copy and paste it into my projects from the open example.

Thank you @Finite_State! Good advice and thank you for catching my error on not initiating the node.

This solved the problem.

A few notes for those who come along after:

  1. You need at least V.1.14.0.1 (previous versions do not support the Value option)
  2. Use Value A & Value B when working with strings, I received the Invalid call of Datum when I tried the Arg1 & Arg2.
  3. I found the Equal To in the Options.scriptcanvas file in the SamplesProject.