Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Valdred on April 28, 2010, 01:05:54 pm

Title: what the #? comment giving me syntax error
Post by: Valdred on April 28, 2010, 01:05:54 pm
So this line is giving me a syntax error:

#@character_name = ""

it's not the last line, and what I posted is the full line. I tried to move it to another line, the syntax error followed.  :wacko:
Title: Re: what the #? comment giving me syntax error
Post by: Aqua on April 28, 2010, 02:51:37 pm
What about what you had on previous/following lines?
Title: Re: what the #? comment giving me syntax error
Post by: Valdred on April 28, 2010, 03:03:05 pm
 if @page == nil #and $game_map.events[@id] != Map_Enemy
      # Set each instance variable
      @tile_id = 0
      #@character_name = ""
      @character_hue = 0
      @move_type = 0
      @through = true
      @trigger = nil
      @list = nil
      @interpreter = nil
      # End method
      return
    end

Of course I can just remove the comment, but I wonder why it's happening.
Title: Re: what the #? comment giving me syntax error
Post by: ForeverZer0 on April 28, 2010, 06:37:04 pm
You sure the syntax error is coming from that line?

Are you also sure it is a syntax error and not a NoMethod, NoName, etc. error?
Title: Re: what the #? comment giving me syntax error
Post by: Blizzard on April 29, 2010, 03:44:08 am
There's something unusual I noticed a few times while working in RMXP's script editor. It would switch a double space in the indentation with an unusual character. Try to remove the indentation of that piece of code completely (select it and press SHIFT+TAB until it's on the left border) and then put the indentation back (select it and press TAB).
Title: Re: what the #? comment giving me syntax error
Post by: Valdred on April 29, 2010, 09:32:33 am

That explains it all, Case closed.
Title: Re: what the #? comment giving me syntax error
Post by: Valdred on May 09, 2010, 01:33:34 pm
Damn, now it's happening again, and what you said isn't working this time. It's happening mostly when I copy a script from somewhere else.