Thread: [Question] Password Protected PC
View Single Post
  #4    
Old December 12th, 2012 (01:39 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,012
I would say you can just event this, rather than do any scripting.

Entering free text (i.e. typing with the keyboard as opposed to the way official games let you enter words) will currently cause problems in the way hanseic describes. However, I've fixed that for v11.


Quote originally posted by Theik:
Don't program in rmxp myself, but at first glance:
You use a case, followed by a when / else statement.

In most programming languages you'd use an if for the construction you ate using. Generally speaking a case only allows simple compares.

Case switch
1: dosomething
2: dosomethingels
Default: dosomethingdefault
There's nothing wrong with using case here, and thor348 used it correctly. It's just a matter of preference.

If you want to offer advice on how to code in Ruby, perhaps you should learn a bit of Ruby first.
__________________
Reply With Quote