(RMXP) Script compatibility error

My game event script has changed since it was used for Behemoth's metroid script, but when used at the same time as Lambchop and DerVVulfman's vehicle script there's errors.

the "return if" part on the 2nd line was to make them both work together - it makes both of them Almost work except for one thing, the samus character's bullets no longer affect anything. Is there a better part to put the "return" or another way to make sure that works as well?


Code:
  #--------------------------------------------------------------------------
  def   check_event_extras
return if @event.name =~ Vehicles::VEHICLE_FORMULA
    text = @event.name
    s= text["*"]
    if s=="*" #Shot trigger
      @trigger = 6 #if a shot triggers
    end
    s = text["monster"]
    @monster = s=="monster"
    @tint=0
    @thp=0
    text.gsub!(/\\[Ii]\[([0-9]+)\]/) { "\001[#{$1}]" }
    text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\002[#{$1}]" }
    # Get 1 text character in c (loop until unable to get text)
    while ((c = text.slice!(/./m)) != nil)
      # If \I[n]
      if c == "\001"
        # Change text color
        text.sub!(/\[([0-9]+)\]/, "")
        @tint = $1.to_i #computer intelligence
        next
      end
      if c == "\002"
        # Change text color
        text.sub!(/\[([0-9]+)\]/, "")
        @thp = $1.to_i #computer HP
        next
      end
    end
    
    #print("trigger=" + @trigger.to_s)
    #print("int=" + @tint.to_s)
    #print("hp=" + @thp.to_s)

  end
I do not believe =~ is a ruby operator
I do not believe =~ is a ruby operator

Oh hmm, what would I use instead? It fails to work when I get rid of the "~"
=~ is a valid operator. It's even on the page you linked.

Can you provide the whereabouts on the scripts, or upload your Scripts.rxdata?
Ah. I see it now. Weird use. You would certainly have an idea of how it would be used.
=~ is a valid operator. It's even on the page you linked.

Can you provide the whereabouts on the scripts, or upload your Scripts.rxdata?


Here's the script file, thank you for helping https://filebin.net/l4vwcsaxal49gmlv
My issue is that I'm not familiar with how this Metroid script works, nor do I know where I can get a demo of it in action. Part of me thinks the issue is unrelated to your fix and could--just maybe--be scripts that aren't meant to ever work together.

I probably should have asked for a minimal reproducible demo instead.
My issue is that I'm not familiar with how this Metroid script works, nor do I know where I can get a demo of it in action. Part of me thinks the issue is unrelated to your fix and could--just maybe--be scripts that aren't meant to ever work together.

I probably should have asked for a minimal reproducible demo instead.

Oh okay here's a more recent demo than the one I used, only one I could find. It has some scripts by others in Add ons under "Materials" but I'm only using behemoth's stuff above that. A lot of the original rmxp scripts were edited so it's a tough issue.

My issue is that I'm not familiar with how this Metroid script works, nor do I know where I can get a demo of it in action. Part of me thinks the issue is unrelated to your fix and could--just maybe--be scripts that aren't meant to ever work together.

I probably should have asked for a minimal reproducible demo instead.

Nevermind, I've just got rid of it - while it was a fun minigame it's not worth ruining the exploration of the world map so I've removed all traces of it so now everything works fine. It has managed to work with a lot of scripts, just not any involving vehicle world map movement so if that's not important to someone, like if there's no world map or it's point to point (mario world style) it's a recommended fun minigame.

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-script-compatibility-error.122372/