Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Error in Chat System (Netplay + Runescape Chat System)

I tried Using this script i found Its a Runescape Chat Script for Netplay Plus and I Tried using it but i got an error...

http://img182.imageshack.us/img182/5069/image8wg6.png[/img]
 

I dont know what it means can you guys help?

heres the script

#===============================================================================
# ** Scene_Chat (2)
#-------------------------------------------------------------------------------
# Author    Shark_Tooth
# Version  1.0
# Date      11-04-06
# Controls
# F5 makes it visible/active. You can click on the map to disable it and
# click on the chat again to make it active.
#===============================================================================
SDK.log("Chat2", "Shark_Tooth", "1.0", " 24-05-06")

if SDK.state('Chat2') == true and User_Edit::CHAT_SYSTEM == 'Chat[2]'
class Scene_Map
  #-------------------------------------------------------------------------
  alias st_rchat_main_draw main_draw
  alias st_rchat_update_systems update_systems
  alias st_rchat_main_dispose main_dispose
  #-------------------------------------------------------------------------
  # * Main Draw
  #--------------------------------------------------------------------------
  def main_draw
    #Calls the chat windows but hides it
    @rChat_window = Window_Chat.new      #Calls the chat window
    @rChat_window.active = false          #Disables it
    @rChat_window.visible = false        #Hides it
    @rChat_window.z += 9000              #Makes it appear on top
    @rChat_window.height = 116            #Makes the window smaller
    @rChat_window.y = 316                #Moves it down
    @rInput_window = Window_ChatInput.new #Calls the input window
    @rInput_window.active = false        #Disables it
    @rInput_window.visible = false        #Hides it
    @rInput_window.z += 9000              #Makes it uppear on top
    #Calls the other windows in Scene Map
    st_rchat_main_draw
  end
  #--------------------------------------------------------------------------
  # * Main Dispose
  #--------------------------------------------------------------------------
  def main_dispose
    #Disposes the chat windows.
    @rChat_window.dispose
    @rInput_window.dispose
    st_rchat_main_dispose
  end
  #--------------------------------------------------------------------------
  # * Update Systems
  #--------------------------------------------------------------------------
  def update_systems
    st_rchat_update_systems
    update_rchat
  end
  #--------------------------------------------------------------------------
  # * Update rChat
  #--------------------------------------------------------------------------
  def update_rchat
    if Input.trigger?(Input::F5) and @rChat_window.visible == false
      @rChat_window.active = true
      @rChat_window.visible = true
      @rInput_window.active = true
      @rInput_window.visible = true
    elsif Input.trigger?(Input::F5) and @rChat_window.visible == true
      @rChat_window.active = false
      @rChat_window.visible = false
      @rInput_window.active = false
      @rInput_window.visible = false
      return
    end
    update_mouse_rcontrols if @rInput_window.visible or @rChat_window.visible
    return if @rInput_window.active == false or @rChat_window.active == false
    #update keys
    update_rup_keys if !Input.pressed?(Input::Shift)
    update_rlow_keys if Input.pressed?(Input::Shift)
    #Updates Enter, Space, F5, ESC, F6
    update_rcontrols
    # Update Background and windows
    @rChat_window.update if $game_temp.chat_refresh
    @rInput_window.update if @rInput_window.old_text != @rInput_window.text.size
  end
  #--------------------------------------------------------------------------
  # * Update Mouse rcontrols
  #--------------------------------------------------------------------------
  def update_mouse_rcontrols
    #Checks if Left Mouse Buttons is pressed
    if Input.pressed?(Input::Mouse_Left)
      #Checks the position of the mouse and enables/disables chat
      if mouse_over?(@rChat_window) or mouse_over?(@rInput_window)
        $game_system.se_play($data_system.decision_se) if not @rInput_window.active
        @rInput_window.active = true
        @rChat_window.active = true
        return true
      end
      @rInput_window.active = false
      @rChat_window.active = false
      return false
    end
  end
  #--------------------------------------------------------------------------
  #  Check Mouse over window?
  #--------------------------------------------------------------------------
  def mouse_over?(window)
    if $mouse.x > window.x and $mouse.x < window.x + window.width and
      $mouse.y > window.y and $mouse.y < window.y + window.height
      return true
    end
    return false
  end
  #-------------------------------------------------------------------------
  # * Updates Enter, Space, F5, ESC, F6
  #-------------------------------------------------------------------------
  def update_rcontrols
    # Sends chat message.
    if Input.triggerd?(13)
      if @rInput_window.text.size == 0
        $game_system.se_play($data_system.buzzer_se)
        return
      elsif User_Edit::ENABLE_MC
        for mp in Network::Main.mapplayers.values
          next if mp == nil
          next if mp.map_id != $game_map.map_id
          name = Network::Main.name
          textss = @rInput_window.text
          Network::Main.mchat(mp.netid,"#{name}) #{textss}")
        end
        name = Network::Main.name
        textss = @rInput_window.text
        id = Network::Main.id
        Network::Main.mchat(id,"#{name}) #{textss}")
        @rInput_window.text.clear
        return
      else
        name = Network::Main.name
        Network::Main.socket.send("<chat>#{name}) #{@rInput_window.text}</chat>\n")
        @rInput_window.text.clear
        return
      end
    end
    # Clear the Chat Log
    $game_temp.chat_log.clear if Input.triggerd?(Input::Fkeys[6])
    #Space
    @rInput_window.text.push(" ") if Input.triggerd?(Input::Space)
    # Removes last entry in test.
    @rInput_window.text.delete_at(-1) if Input.triggerd?(Input::Back) and @rInput_window.text.size != 0
  end
  #-------------------------------------------------------------------------
  # * Updates UpperKeys
  #-------------------------------------------------------------------------
  def update_rup_keys
    #Checks for Numberkeys input.
    for key in Input::Numberkeys.keys
      @rInput_window.text.push(key.to_s) if Input.triggerd?(Input::Numberkeys[key])
    end
    #Checks for Letter input.
    for key in Input::Letters.keys
      @rInput_window.text.push(key.downcase.to_s) if Input.triggerd?(Input::Letters[key])
    end
    #Checks for other keys
    @rInput_window.text.push("-") if Input.triggerd?(Input::Underscore)
    @rInput_window.text.push(".") if Input.triggerd?(Input::Dot)
    @rInput_window.text.push(",") if Input.triggerd?(Input::Comma)
    @rInput_window.text.push("/") if Input.triggerd?(Input::Backslash)
    @rInput_window.text.push("'") if Input.triggerd?(Input::Quote)
    @rInput_window.text.push("=") if Input.triggerd?(Input::Equal)
  end
  #-------------------------------------------------------------------------
  # * Updates LowerKeys
  #-------------------------------------------------------------------------
  def update_rlow_keys
    #Checks for Numberkeys input.
    for key in Input::Numberkeys.keys
      if Input.triggerd?(Input::Numberkeys[key])
          @rInput_window.text.push("!") if key == 1
          @rInput_window.text.push("@") if key == 2
          @rInput_window.text.push("#") if key == 3
          @rInput_window.text.push("$") if key == 4
          @rInput_window.text.push("%") if key == 5
          @rInput_window.text.push("^") if key == 6
          @rInput_window.text.push("&") if key == 7
          @rInput_window.text.push("*") if key == 8
          @rInput_window.text.push("(") if key == 9
          @rInput_window.text.push(")") if key == 0
        end
    end
    #Checks for Letter input.
    for key in Input::Letters.keys
      @rInput_window.text.push(key.upcase.to_s) if Input.triggerd?(Input::Letters[key])       
    end
    #Checks for Other keys
    @rInput_window.text.push("_") if Input.triggerd?(Input::Underscore) 
    @rInput_window.text.push(">") if Input.triggerd?(Input::Dot)
    @rInput_window.text.push("<") if Input.triggerd?(Input::Comma)
    @rInput_window.text.push("?") if Input.triggerd?(Input::Backslash)
    @rInput_window.text.push("''") if Input.triggerd?(Input::Quote)
    @rInput_window.text.push("+") if Input.triggerd?(Input::Equal)
end
end
  #-------------------------------------------------------------------------
  # End Enable SDK Check
  #-------------------------------------------------------------------------
end
 
Well, I'm not 100% sure, but I don't think that you had the SDK files that you needed inside your project. I don't think that Netplay has that built in, but I may be wrong. Your error is saying that you are missing something like,

Code:
class something
  def command_108
     instructions, ect....
  end
end

in your script. It is probably located inside a part of the SDK by my thinking. I don't think that Netplay has the abillity to insert the SDK though if it's not already present because of everything being rewritten to work together better. Hopefully someone will come along who has more experience though and verify this...

Hope this helps!!

~xgamexfreakx
 
Like I said, the SDK is going to need a lot of work if you want to use it for netplay...

this error is probably conflicting with your new script...I think there is already a chat window programed into netplay and you are trying to over-write it. Scene_Chat2 is part of the pre-programed chat program. To get yours to work right, I think that you remove the old chat but it would be very difficult. All of the scripts work around each other and are not meant to be played with unless you really know what you are doing. See if you can find the default chat window in-game first. Then if you can't find it, you'll have to add this new one.

Hope this Helps!

~xgamexfreakx
 
you said the patches I and II right? Because thats what I did and it works but one you type for a while the command error comes up again


EDIT: OK IT WORKS!!! but... how did you make your chat box in the game smaller in length
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top