Something Strange.

Now Ill be brief.

This guy wrote me a series of scripts and they all work fine on his computer. when he sends the game to me, I always encounter no method errors and argument errors.

I do not even know why this happens.

I mean - the scripts, let alone the game itself works perfectly on his computer, why couldn't it work on mine? Is there something wrong? Any ideas guys? I am sure many of you have experienced the same thing.

Note that I am using RPG Maker VX ACE
This is probably rather a silly question, but is your friend using VX Ace, as well?
Yes...were both using ace
Are you adding any other scripts after he sends it to you?
Nope. Fresh copy
Are you starting a new game, or are you loading a previously saved game?
Alright, well, apparently loading a new game makes most scripts work!

Except for certain scripts....

I believe that's for the coder to answer....
It is standard practice to start a new game when you add scripts.  Because a lot of scripts require things to be set up against actors, and actor data is saved with the save file.  And if you have a save file from a game that was created prior to adding those scripts, that data won't be there.

So not really up to the coder to answer (except for the "certain scripts" that maybe still have errors) - it's a case of getting all your scripts into place before starting development.
actually the only thing now is that if I turn on the condition switch on any event, the line fifty four error occurs of a no method error. on one of the scripts

In that case, it must be the script itself.
Are you running a save file to test every time? Try running a new game. Also consolidate the script in your game and the one sent to you, make sure nothing NOTHING is missing. Even the smallest comma missing can ruin it.

Do you have any other scripts? If so could be a script conflict.

Make sure you place your scripts under materials but above main, and save and apply before testing.

Could you put up the script so we can try?
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

What's "the line 54 error"?  You haven't actually given us any details on the errors, or what the scripts are, or who wrote them, or whether you downloaded them.

If you want us to help you, we need to see the script and the FULL error message.  Otherwise, if they're not shared scripts and only you and he have them, you will need to talk with him to sort it out, as we would only be guessing.

(2fruit, all those questions have already been asked, and answered)
Yes some of my questions have been asked, but not all
alright ill put on a screenshot and the error message and the script itself...
Alright I know I am double posting.

But here is the script


#===============================================================================

# Group Encounter System

# By Lecode

# For Strashiner

# ------------------------------------------------------------------------------

# Terms of Use:

# ------------------------------------------------------------------------------

# -Credit is required (Lecode)

# -For Strashiner project only

#===============================================================================

 

module Lecode

  module GroupEncounter

    

    Chase_Duration = 180

    

    Chase_Emoticon = 1

    

    Formations = {

      #Nbr of enemies => Troop_id

      1 => 7,

      2 => 8,

      3 => 9,

      4 => 10,

      5 => 11,

      6 => 12,

      7 => 13,

      8 => 14

    }

    

  end

end

 

 

class Game_Event

  include Lecode::GroupEncounter

  attr_reader :legrenc_valid

  attr_reader :legrenc_enemy_id

  attr_reader :legrenc_chasing

  attr_reader :legrenc_call_group

  attr_reader :legrenc_group_id

  alias legrenc_initialize initialize

  def initialize(*args)

    @true_move_info = {}

    @legrenc_chasing = false

    @legrenc_valid = false

    @legrenc_chase_duration = Chase_Duration

    legrenc_initialize(*args)

    read_legrenc_coms

  end

  

  def read_legrenc_coms

    text = ""

    for command in @list

      if command.code == 108 or command.code == 408 #- Comments

        text += command.parameters[0]

      end

    end

    #- Process text

    if text =~ /<group encounter>/

      @legrenc_valid = true

      @legrenc_switch = nil

      text.gsub!("<group encounter>","")

      text.gsub!("</group encounter>","")

      text.gsub!("\n","")

      @legrenc_group_id = $1.to_i if text =~ /group_id:[ ]?(\d+);/i

      @legrenc_range = $1.to_i if text =~ /range:[ ]?(\d+);/i

      @legrenc_enemy_id = $1.to_i if text =~ /enemy_id:[ ]?(\d+);/i

      @legrenc_call_group = $1.to_i if text =~ /call_group:[ ]?(\d+);/i

      @legrenc_switch = $1.to_s if text =~ /switch:[ ]?(.+);/i

      #- Verifications

      if false

        puts "Group_id: #{@legrenc_group_id}"

        puts "Range: #{@legrenc_range}"

        puts "Enemy_id: #{@legrenc_enemy_id}"

        puts "Call_group: #{@legrenc_call_group}"

      end

    end

  end

  

  alias legrenc_sps setup_page_settings

  def setup_page_settings

    legrenc_sps

    @true_move_info[:move_type] = @move_type

    @true_move_info[:move_speed] = @move_speed

    @true_move_info[:move_frequency] = @move_frequency

  end

  

  alias legrenc_update update

  def update

    legrenc_check_range if @legrenc_valid

    legrenc_update

  end

  

  def legrenc_check_range

    return if @erased

    if @legrenc_chasing

      @balloon_id = legrenc_chase_emoticon

      @legrenc_chase_duration -= 1

      legrenc_exit_chase if @legrenc_chase_duration == 0

      return

    end

    legrenc_chase_player if legrenc_player_in_range

  end

  

  def legrenc_player_in_range

    dx = distance_x_from($game_player.x)

    dy = distance_y_from($game_player.y)

    range = @legrenc_range

    distance = Math.sqrt(dx*dx + dy*dy)

    return distance <= range

  end

  

  def legrenc_chase_player

    @legrenc_chasing = true

    @legrenc_chase_duration = Chase_Duration

    @move_type = 2

    update_self_movement

  end

  

  def legrenc_exit_chase

    @legrenc_chasing = false

    @move_route_index = 0

    @move_type = @true_move_info[:move_type]

    @balloon_id = 0

  end

  

  def legrenc_activate_switch

    return if @legrenc_switch.nil?

    key = [@map_id, @event.id, @legrenc_switch]

    $game_self_switches[key] = true

    update

    refresh

  end

  

  alias legrenc_erase erase

  def erase

    legrenc_exit_chase

    legrenc_erase

  end

  

  def legrenc_chase_emoticon

    Chase_Emoticon

  end

    

end

 

 

class Game_Map

  

  def setup_starting_map_event

    event = @events.values.find {|event| event.starting }

    if event

      event.clear_starting_flag 

      @interpreter.setup(event.list, event.id)

      @interpreter.set_legrenc_event(event)

    end

    event

  end

  

end

 

 

class Game_Interpreter

  

  def set_legrenc_event(event)

    @legrenc_event = event

  end

  

  alias legrenc_command_301 command_301

  def command_301

    if @legrenc_event && @legrenc_event.legrenc_valid

      $game_system.legrenc_event = @legrenc_event

    end

    legrenc_command_301

    $game_system.legrenc_event = nil

  end

  

end

 

 

module BattleManager

  

  class << self

    alias legrenc_setup setup

  end

  

  def self.setup(troop_id, can_escape = true, can_lose = false)

    legrenc_setup(troop_id, can_escape = true, can_lose = false)

    unless $game_system.legrenc_event.nil?

      event = $game_system.legrenc_event

      ids = legrenc_get_group

      $game_troop.group_setup(troop_id,ids)

      make_escape_ratio

    end

  end

  

  def self.legrenc_get_group

    ids = []

    $game_map.events.values.each do |event|

      next unless event.legrenc_valid

      call_id = $game_system.legrenc_event.legrenc_call_group

      next unless event.legrenc_group_id == call_id

      next unless event.legrenc_chasing

      event.legrenc_activate_switch

      ids.push(event.legrenc_enemy_id)

    end

    return ids

  end

  

end

 

 

class Game_Troop

  

  def group_setup(troop_id,ids)

    clear

    @troop_id = troop_id

    @enemies = []

    formation_id = Lecode::GroupEncounter::Formations[ids.size]

    dummy_troop = $data_troops[formation_id]

    ids.each_with_index do |id,i|

      next unless $data_enemies[id]

      enemy = Game_Enemy.new(@enemies.size, id)

      #- enemy.hide if member.hidden

      enemy.screen_x = dummy_troop.members.x

      enemy.screen_y = dummy_troop.members.y

      @enemies.push(enemy)

    end

    init_screen_tone

    make_unique_names

  end

  

end

 

 

class Game_System

  attr_accessor :legrenc_event

  alias legrenc_initialize initialize

  def initialize

    @legrenc_event = nil

    legrenc_initialize

  end

  

end
 

 

 

 

 

 

 

also this is the error message: I got this message even by putting an empty condition switch ON, without autorun or paralelle process and just the action button. strange eh"

abhtsi.png
Close this thread, I solved it on my own. 

Original thread: https://forums.rpgmakerweb.com/threads/something-strange.47945/