Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2013-04-01 07:05:06

S32X
Member
From: Rochester, New York
Registered: 2012-03-18
Posts: 880
Website

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.

Offline

#2 2013-04-01 16:22:43

lunarrush
Member
Registered: 2010-05-13
Posts: 278

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

Offline

#3 2013-04-01 17:08:48

S32X
Member
From: Rochester, New York
Registered: 2012-03-18
Posts: 880
Website

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"

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

Offline

#4 2013-04-01 19:45:49

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: Nanoparser Error (AGAIN!!!!)

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


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#5 2013-04-01 22:54:15

S32X
Member
From: Rochester, New York
Registered: 2012-03-18
Posts: 880
Website

Re: Nanoparser Error (AGAIN!!!!)

This is my best guess

create_child ".default_startup.opening_animation"

Offline

#6 2013-04-02 01:12:48

jobromedia
Member
From: Stockholm, Sweden
Registered: 2009-11-01
Posts: 1,072
Website

Re: Nanoparser Error (AGAIN!!!!)

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

/mod

Offline

#7 2013-04-02 04:52:45

S32X
Member
From: Rochester, New York
Registered: 2012-03-18
Posts: 880
Website

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

Offline

#8 2013-04-02 09:02:32

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

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 ?


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#9 2013-04-02 20:48:09

S32X
Member
From: Rochester, New York
Registered: 2012-03-18
Posts: 880
Website

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.

Offline

#10 2013-04-08 19:33:53

aronthehedgehog
Member
From: Lincoln, NE
Registered: 2013-04-05
Posts: 390

Re: Nanoparser Error (AGAIN!!!!)

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


Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.

Offline

#11 2013-04-09 04:00:03

aronthehedgehog
Member
From: Lincoln, NE
Registered: 2013-04-05
Posts: 390

Re: Nanoparser Error (AGAIN!!!!)

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


Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org