Hi. In theory I think is about right but for some reason it doesn't work. Any ideas? Thank you very much for your help!
public delegate void PullFunction(GameObject o);
[18-1-19] Compile file : 1212.cs
public delegate void PullFunction(GameObject o);
if (Object.S1NPCDataController.Name == "name1") return false;
if (Object.S1NPCDataController.Name == "name2") return false;
if (Object.S1NPCDataController.Name == "name3") return false;
[18-1-19] Compile file : 1212.cs
[18-1-19] [COMPILER] Compilation error !
[18-1-19] Line number : 310, Error Number : CS1519, 'Symbol 'if' not valid
[18-1-19] Line number : 310, Error Number : CS1519, 'Symbol '==' not valid
[18-1-19] Line number : 311, Error Number : CS1519,'Symbol '==' not valid
[18-1-19] Line number : 312, Error Number : CS1519, 'Symbol '==' not valid

VulpesRank #55 · 29.2K reputationPosted May 12, 2013, 8:35 AM EDT
1. The compiler thinks that Object refers to System.Object (or 'object' in C#) which doesn't have a property called S1NPCDataController.
2. The three 'if' statements do not appear within a method or property but at class level or even outside any class which, of course, is not allowed in C#.
Jesus Vicente4 reputationPosted May 12, 2013, 9:40 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 12, 2013, 10:15 AM EDT
Assuming that Name is a read-only string property, you're not setting it but getting it to see whether it's equal to some 'literal' value.