Defining a vocab (complete noob question)

So, I'm trying to add a new option to the main menu, and I don't really know what I'm doing. I found a tutorial but I think that must be for an older version of rpgmaker. So far I've done this.

In Window_MenuCommand

 def add_internet_command

    add_command(Vocab::internet, :internet, internet_enabled)

  end
In Scene_Menu

  def command_internet

    SceneManager.call(Scene_Internet)

  end
Created Scene_Internet (basically a copy of Scene_Status)

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

# ** Scene_Internet

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

#  This class performs the internet screen processing.

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

 

class Scene_Internet < Scene_MenuBase

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

  # * Start Processing

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

  def start

    super

    @status_window = Window_Status.new(@actor)

    @status_window.set_handler🙂cancel,   method🙂return_scene))

    @status_window.set_handler🙂pagedown, method🙂next_actor))

    @status_window.set_handler🙂pageup,   method🙂prev_actor))

  end

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

  # * Change Actors

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

  def on_actor_change

    @status_window.actor = @actor

    @status_window.activate

  end

end

 
The problem I'm having is with the Window_MenuCommand part saying it can't find the vocab, and I don't know how to define a new vocab or even exactly what it is. In the tutorial I was looking at it said something about defining a internet.new thing, but I don't see anything.new in any of the scripts so I assume that's outdated info. Someone else said I didn't need to have the vocab part in there at all, that I can just call stuff directly. So I assume the vocab means vocabulary and is a way to "shortcut" scripts? Anyway, if anyone could guide me to some info about how to properly do this that would be great.
Scripts is for completed scripts, not this. I think the best option for this would be "learning RGSS" as that's what you appearently trying to do.

I've moved this thread to Learning Ruby and RGSS. Please be sure to post your threads in the correct forum next time. Thank you.

A vocab is a text you define for display - in that case you wanted to use a vocab in the very first add_command line. You either have to define the vocab you're trying to use there, or use a direct string instead of a vocab.

However, could you explain what you're trying to do?

Adding real internet functionality is one of the most complex tasks possible - after several years of Ace scripting, there are one or two scripts done by very experienced scripters that manage a basic internet access - it is nothing a new programmer can achieve.
Scene_Internet huh? Whats that all about? 😛
Hey ♫

You can replace Vocab::internet with "Internet" (with the quotes) it it should work perfectly. 

The Vocab variables are just Strings (A datatype used for storing strings) which are all kept in one place called "Vocab", but you don't need to add you're string in there for your script to work. You can just "hard code" the string which will be used as the label.

I hope this helps

/Kai

EDIT: If you actually wanted to put your variable in the Vocab section, you could add it in Vocab class (The first script in the list), but there is really no advantage to doing so.

Finally, it looks like you are making changes to the built in scripts themselves, rather than making your changes all in scripts under materials. This is perfectly fine if this is exclusively for you own use, but will make it nigh-impossible to release to others.

If you have any questions, don't hesitate to ask

Original thread: https://forums.rpgmakerweb.com/threads/defining-a-vocab-complete-noob-question.42780/