Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A question regarding a key script
k.okkim Offline
Junior Member

Posts: 3
Threads: 1
Joined: Jun 2016
Reputation: 0
#3
RE: A question regarding a key script

(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 Smile We don't offer a drop down menu, but you can use this:

[spoiler][php]Paste your code here.[/php][/spoiler]

Which will yield:

Spoiler below!
PHP Code: (Select All)
Paste your code here


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.

Spoiler below!
PHP Code: (Select All)
SetSwingDoorLocked(asEntityfalsetrue); 


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()?
(This post was last modified: 06-13-2016, 10:21 AM by k.okkim.)
06-13-2016, 10:17 AM
Find


Messages In This Thread
A question regarding a key script - by k.okkim - 06-13-2016, 08:30 AM
RE: A question regarding a key script - by k.okkim - 06-13-2016, 10:17 AM



Users browsing this thread: 1 Guest(s)