(06-13-2016, 09:12 AM)Rotalumor Wrote: You've got an "AddUserItemCallback()", but the correct syntax is AddUseItemCallback(). Drop the "r" in Use. Furthermore, your void syntax for FUNCTION is wrong, though because I'm on mobile, I can't really remember it off the top of my head.
Though, based on your code, look back through this tutorial, again if necessary: https://wiki.frictionalgames.com/hpl2/tu...cks_a_door .
Whenever an error comes up, the error tells you what to look out for. The (3, 2) means that the error occurs on or before line 3, 2 characters across.
And also, you're allowed to post your raw code here from your text file
We don't offer a drop down menu, but you can use this:
[spoiler][php]Paste your code here.[/php][/spoiler]
Which will yield:
So I changed the Item and Door to asItem and asDoor respecively as well as removed the extra R from AddUserItemCallBack, but I'm still getting errors. I'm also wondering what you meant by my void syntax for FUNCTION being wrong. I'm looking at the page, but I don't understand what it's explaining in the void FUNCTION() snippet.
What does the asEntity and the booleans mean in it? I understand that the
false tag is meant to do the opposite of what the syntax is supposed to do, but why is the
true which comes after it? Apologies if I'm not using the correct terminology, I'm still a complete newbie when it comes to coding.
I also checked the point (3, 2) in the script, but it's completely empty. I've used Tab to organize the code, but that shouldn't even affect the code in any way. Does it mean the AddUseItemCallBack() syntax is not supposed to be in void OnStart()?