Topic: Nanoparser Error (AGAIN!!!!)

// ---------------------------------------------------------------------------
// Open Surge Engine
// http://opensnc.sourceforge.net
//
// File:   objects/default_startup.obj
// Desc:   default startup object. Takes care of the HUD and stuff.
// Author: Alexandre
// Date:   2010-12-20, 2010-12-21, 2011-01-01, 2011-08-21, 2012-01-01, 2012-01-15
// ---------------------------------------------------------------------------
// You MUST NOT modify this script! If you need a different functionality
// in a level you make, please create a different startup object script.

#include "hud.inc"
#include "opening_animation.inc"
#include "level_cleared.inc"
#include "switch_character.inc"
#include "pause.inc"
#include "quit.inc"
#include "camera.inc"
#include "water.inc"

// ----------------------------------------------
// This object is created by default
// in every level that contains the
// 'startup ".default_startup"' line
// ----------------------------------------------

object ".default_startup"
{    
requires 0.2.0   
always_active 
  state "main"
  {
  hide
  on_timeout 1.5 "on"
  }
  state "on"
  {   
  create_child ".default_startup.opening_animation"       
  create_child ".default_startup.level_cleared"       
  create_child ".default_startup.switch_character"     
  create_child ".default_startup.camera"      
  create_child ".default_startup.water"      
  change_state "cooldown"    
  }

  state "cooldown"
  {      
  on_timeout 4.0 "enable_hud"  
  }
  
  state "enable_hud"
  {  
  let "$_hide_hud = 0"
  let "$_disable_character_switching = 0"            
  create_child ".default_startup.pause"     
  create_child ".default_startup.quit"      
  destroy    
  }
}

The Error says that on line 56 there's and unexpected symbol "{" I looked on like 56, an there's no "{" there. (btw) the double-spacing is the copy/past thing, I didn't write it this way.

Re: Nanoparser Error (AGAIN!!!!)

That's likely to come from an opening bracket without a closing bracket on an include, I'd direct you to these files to correct your issue.  Also, if the below files aren't in a sub-folder I think they can be parsed just like regular objects, which means they don't need an include statement, I would suggest leaving them in a sub-folder for your sanity's sake and the sanity's sake of anyone who tries to debug your code.

#include "hud.inc"
#include "opening_animation.inc"
#include "level_cleared.inc"
#include "switch_character.inc"
#include "pause.inc"
#include "quit.inc"
#include "camera.inc"
#include "water.inc"
If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Nanoparser Error (AGAIN!!!!)

lunarrush wrote:

That's likely to come from an opening bracket without a closing bracket on an include.

There aren't even any brackets there.

// ---------------------------------------------------------------------------

// Open Surge Engine

// http:
//opensnc.sourceforge.net

//

// File:   objects/default_startup.obj

// Desc:   default startup object. Takes care of the HUD and stuff.

// Author: Alexandre

// Date:   2010-12-20, 2010-12-21, 2011-01-01, 2011-08-21, 2012-01-01, 2012-01-15

// ---------------------------------------------------------------------------


// You MUST NOT modify this script! If you need a different functionality

// in a level you make, please create a different startup object script.



#include "hud.inc"
#include "opening_animation.inc"
#include "level_cleared.inc"
#include "switch_character.inc"
#include "pause.inc"
#include "quit.inc"
#include "camera.inc"
#include "water.inc"

// ----------------------------------------------

Re: Nanoparser Error (AGAIN!!!!)

what is in line 56? the exact line please. it's hard to tell with all the empty paragraphs

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: Nanoparser Error (AGAIN!!!!)

This is my best guess

create_child ".default_startup.opening_animation"

Re: Nanoparser Error (AGAIN!!!!)

Please consider to remove all unneeded blank lines before posting your code examples.

/mod

Re: Nanoparser Error (AGAIN!!!!)

The issue says the same thing, but now on line 48. However this isn't much of a problem, the fade-in be at the beginning and not four seconds in. wink

Re: Nanoparser Error (AGAIN!!!!)

when there is not an error in the line that you are pointed to, there are two chances:

1. The current script is missing or has too many {}'s
2. If 1 is false, then look in the object that is referenced in the error line

in this case, i'd say the error is in the object ".default_startup.opening_animation" . Did you modify it ?

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: Nanoparser Error (AGAIN!!!!)

Not exaclty. I just moved where it was; the original script went left to right instead of top to bottom, so I changed its format so I could understand it better.

Re: Nanoparser Error (AGAIN!!!!)

i had that many times while i was making my game called sonic x opensurge

www.facebook.com/24XFSAL  Hasn't been updated anytime recently, don't bother.
I'm on SoundCloud: https://soundcloud.com/rain-new-holy - I plan to upload one soon.
Name change from 24XFSAL coming soon. Currently studying for Information Technology and Game development. (Also studying game theory in spare time.)

Re: Nanoparser Error (AGAIN!!!!)

Yup that will do it i did how he did it and that did it.

www.facebook.com/24XFSAL  Hasn't been updated anytime recently, don't bother.
I'm on SoundCloud: https://soundcloud.com/rain-new-holy - I plan to upload one soon.
Name change from 24XFSAL coming soon. Currently studying for Information Technology and Game development. (Also studying game theory in spare time.)