TheGreatCthulhu
Member
Posts: 213
Threads: 10
Joined: Oct 2010
Reputation:
32
|
RE: I need help getting maps made
There you go. If your script is relatively small, what you can do is comment it all out (select text, then Ctrl + Q in Notepad++ on Windows), so that the engine doesn't recognize any of it, and start the map from the game. Then bring up the Debug menu (F1), and uncomment (also Ctrl+Q) functional parts of your script, for example, one function at a time (along with any variable declarations the function might use), then click the "Recompile Script And Lang" button to isolate your error more easily. If nothing happens, that part of your script is fine; if there's an error, read what it is, try to understand the error message, and then try to fix it.
|
|
12-07-2012, 05:06 AM |
|
AveryLuna
Junior Member
Posts: 10
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: I need help getting maps made
Well my game crashes now with a Fatal Error message saying it couldn't load my map.
|
|
12-07-2012, 05:11 AM |
|
TheGreatCthulhu
Member
Posts: 213
Threads: 10
Joined: Oct 2010
Reputation:
32
|
RE: I need help getting maps made
Sry, Ctrl+Q toggles comments, so lines which are already commented out become uncommented and cause errors. Use Ctrl+K to block-comment instead, and Ctrl+Shift+K to block-uncomment. (Or Edit menu > Comment/Uncomment > pick_an_option).
Or, if you know parts of your code work, you can leave them active. If you can't make it work with comments, just post the code and the error messages here.
|
|
12-07-2012, 05:19 AM |
|
AveryLuna
Junior Member
Posts: 10
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: I need help getting maps made
I can't find my profiles to give myself the rights to get the debug menu, here's exactly what it says.
Fatal Error: Could not load script file 'custom_stories/House/maps/Trial.hps'! main (5,1): ERR Unexpected token "{"
I think I might actually know what's wrong with that, I'll try to fix it, incase I'm wrong, let me know how to fix this, thanks
Nevermind, I was right, there were more errors though, but after the last error it was easy. Thunder didn't happen, but I think I need to create the thunder first then use it's name. I think I learned some of this stuff fast, like after really reading the aforementioned error I knew all the "expected ';'" ones. It's playable, and now I know the issues I need to fix, like getting the key for the door, thunder and sanity loss, oh and the rest of the map.
(This post was last modified: 12-07-2012, 05:57 AM by AveryLuna.)
|
|
12-07-2012, 05:48 AM |
|
TheGreatCthulhu
Member
Posts: 213
Threads: 10
Joined: Oct 2010
Reputation:
32
|
RE: I need help getting maps made
To see how to get the Debug menu (which is really just a floating window on the side, with some buttons and other items on it), see Setting Up Development Environment on the wiki.
It's much easier when you use the Debug menu, then when you have to go through the load-crash-restart-load-crash... cycle.
About the error: the (5, 1) means that it's on line 5 (or near it - maybe a line or two above), character 1 (that's where the script engine figured out something was wrong).
From what I've seen on the forums here, this usually happens when people create a code block (the { and } define a code block), but there's no function declaration associated with it, or when you put a ; where you're not supposed to.
If you can't fix it, post a code snippet showing line 5 and it's surroundings - but try to post it so that it's not completely out of context (like an isolated line of code we cant be sure of how it fits in the whole), but something that people here can use to get an idea of what you're trying to do, so that they can help.
|
|
12-07-2012, 06:03 AM |
|
AveryLuna
Junior Member
Posts: 10
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: I need help getting maps made
(12-07-2012, 06:03 AM)TheGreatCthulhu Wrote: To see how to get the Debug menu (which is really just a floating window on the side, with some buttons and other items on it), see Setting Up Development Environment on the wiki.
It's much easier when you use the Debug menu, then when you have to go through the load-crash-restart-load-crash... cycle.
About the error: the (5, 1) means that it's on line 5 (or near it - maybe a line or two above), character 1 (that's where the script engine figured out something was wrong).
From what I've seen on the forums here, this usually happens when people create a code block (the { and } define a code block), but there's no function declaration associated with it, or when you put a ; where you're not supposed to.
If you can't fix it, post a code snippet showing line 5 and it's surroundings - but try to post it so that it's not completely out of context (like an isolated line of code we cant be sure of how it fits in the whole), but something that people here can use to get an idea of what you're trying to do, so that they can help. That's what I thought it was, I ended up figuring it out just before you posted the message, actually had an "expected" error after the "unexpected" Thanks! Now I just need to officially make it so I get thunder/lighting/sanity loss then all the other questions I can find easy, such as how to link keys to doors, destroy on use, ect.
|
|
12-07-2012, 06:26 AM |
|
|