what the #? comment giving me syntax error

Started by Valdred, April 28, 2010, 01:05:54 pm

Previous topic - Next topic

Valdred

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:

Aqua

What about what you had on previous/following lines?

Valdred

 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.

ForeverZer0

April 28, 2010, 06:37:04 pm #3 Last Edit: April 28, 2010, 06:39:01 pm by ForeverZero
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?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

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).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Valdred


Valdred

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.