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
problem with scare script
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#5
RE: problem with scare script

Debug Messages:
These won't magically make your code work, but you can use them to see if parts of your code (like functions) get called at all, once the script compiles without error messages. A debug message will show up in the lower left part of the screen, when it's line of code gets executed.

To use them, simply type:
AddDebugMessage("Whatever message you want goes here.", false);

The second parameter (false) just indicates if the engine should check for duplicate messages or not, you can ignore it for now.

For example, to see if a specific function get's called (useful for misbehaving callbacks), put something like this at the start of the function (after the '{').
AddDebugMessage("Inside FunctionNameHere", false);

This is documented on the wiki, on the Engine Scripts page.

Error:
The error means, most likely, that on line 52 (or somewhere close, above or below) there's an extra '{' that's not supposed to be there.

Make sure that there's all '{' and '}' are exactly matched. The '{' starts a block of code, '}' ends it. Think of it as of a "folder" for code. They need to be matched.

Also, there can't be any free {} blocks at the top level - there must be a function associated with it. This second case can also occur if there's a ';' at the end of the function declaration (function "header"), since semicolon ends statements, so the code block below it becomes "orphaned".
Check if there's a function declaration ending with a ';' just above, on line 51, or close by.
EDIT: I checked it for you, it's visible in your first post. Here:

void CorpseDoorscare(string &in asParent, string &in asChild, int alState);

Delete that ';'.
(This post was last modified: 01-08-2013, 02:04 AM by TheGreatCthulhu.)
01-08-2013, 02:02 AM
Find


Messages In This Thread
problem with scare script - by zergling50 - 01-06-2013, 10:18 PM
RE: problem with scare script - by Rapture - 01-06-2013, 10:33 PM
RE: problem with scare script - by zergling50 - 01-08-2013, 01:34 AM
RE: problem with scare script - by Damascus - 01-07-2013, 03:10 AM
RE: problem with scare script - by TheGreatCthulhu - 01-08-2013, 02:02 AM
RE: problem with scare script - by Victor - 01-08-2013, 04:32 PM
RE: problem with scare script - by Damascus - 01-08-2013, 08:14 PM
RE: problem with scare script - by zergling50 - 04-06-2013, 08:16 PM
RE: problem with scare script - by Kreekakon - 04-06-2013, 08:29 PM
RE: problem with scare script - by zergling50 - 04-06-2013, 09:01 PM
RE: problem with scare script - by NaxEla - 04-07-2013, 12:58 AM
RE: problem with scare script - by Tiger - 04-07-2013, 01:56 AM
RE: problem with scare script - by NaxEla - 04-07-2013, 04:53 AM
RE: problem with scare script - by Tiger - 04-07-2013, 04:43 PM
RE: problem with scare script - by zergling50 - 04-07-2013, 08:37 PM
RE: problem with scare script - by zergling50 - 04-07-2013, 09:42 PM
RE: problem with scare script - by noovra - 04-08-2013, 02:05 AM
RE: problem with scare script - by Linus Ågren - 04-08-2013, 09:00 AM
RE: problem with scare script - by noovra - 04-08-2013, 01:03 PM
RE: problem with scare script - by zergling50 - 04-10-2013, 11:46 PM
RE: problem with scare script - by NaxEla - 04-11-2013, 12:36 AM
RE: problem with scare script - by zergling50 - 06-11-2013, 08:22 PM
RE: problem with scare script - by GrAVit - 06-12-2013, 08:16 AM
RE: problem with scare script - by Daemian - 06-12-2013, 12:19 PM
RE: problem with scare script - by zergling50 - 06-13-2013, 08:13 PM



Users browsing this thread: 3 Guest(s)