Frictional Games Forum (read-only)

Full Version: What could have gone wrong with my map script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was testing the last map of my CS (I think it will be released tomorrow) and the game crashed. This is the message that appeared:


FATAL ERROR: Could not load script file 'custom_stories/The Seed/custom_stories/The Seed/maps/Final.hps'!
main (313, 2) : ERR : Unexpected end of file

I tried to locate the problem in the HPS file. However, the line 313 is the last one, and seems to be all right.


These are my scripts: http://www.sendspace.com/file/oskeel

And this is the HPL.log file: http://www.sendspace.com/file/r4s9xn

Thank you
Unexpected end of file means there's a missing bracket or something like that. If you provide the .hps, we can help you better.
The hps is the first link: http://www.sendspace.com/file/oskeel
I believe I found the issue, it seems the thread is posted in the wrong section of the forums, causing an error.
(12-11-2012, 12:02 AM)Traggey Wrote: [ -> ]I believe I found the issue, it seems the thread is posted in the wrong section of the forums, causing an error.


Does it really matter? Just move it.
(12-10-2012, 11:21 PM)str4wberrypanic Wrote: [ -> ]The hps is the first link: [url]http://www.sendspace.com/file/oskeel[/url]
Just use the "Insert Formatted Code" button for your hps code. It's right below the italicized "I" in the Editor Tab.


Code:
//Code

void ExecutePlanOmega(What does this do?)
{
  KillDaniel
}
Rapture, i didn't understand where i should use the thing you mentioned. I think the problem can be a missing " , " or " ; ". Do you know a quick way to locate it using the notepad++?
(12-11-2012, 03:45 AM)str4wberrypanic Wrote: [ -> ]Rapture, i didn't understand where i should use the thing you mentioned. I think the problem can be a missing " , " or " ; ". Do you know a quick way to locate it using the notepad++?
I mean this...
Spoiler below!
[Image: formateddcode.png]
Select All your .hps code and paste it in the code parameter in the Forum Editor, in the web browser, at FrictionalGames Forums.
You're missing a bracket in void OnStart Smile

////////////////////////////
// Run first time starting map
void OnStart()
{

AddEntityCollideCallback("Player", "TheresNoReturn", "CloseExit", true, 1);
AddEntityCollideCallback("Player", "ChangeMap", "ChangeMap", true, 1);
AddEntityCollideCallback("Player", "MessageFire1", "MessageFire1", true, 1);
AddEntityCollideCallback("Player", "MessageFire1_1", "MessageFire1_1", true, 1);
AddEntityCollideCallback("Player", "MessageFire1_2", "MessageFire1_2", true, 1);
AddEntityCollideCallback("Player", "FireDamage_1", "FireDamage", false, 1);
AddEntityCollideCallback("Player", "FireDamage_2", "FireDamage", false, 1);
AddEntityCollideCallback("Player", "FireDamage_3", "FireDamage", false, 1);
AddEntityCollideCallback("Player", "StartMusic", "Music", true, 1);
}

Edit:
Quote:Do you know a quick way to locate it using the notepad++?
Not too familiar with it myself, but if you save your file as for example a .cs file, it will change to a more readable view. (Don't forget to revert back to normal .txt/ .hps later Wink )
In that view, clicking on a bracket will highlight it's corresponding closing bracket and everything that's inside two brackets gets a separate "rollout" to click on.
As for finding missing semicolons, I haven't found out anything there yet...
Hirnwirbel, it worked! I really haven't notticed that missing bracket! Thank you.