Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Label
« previous next »
  • Print
Pages: [1]

Author Topic: Label  (Read 1943 times)

Offline Vidian

  • Seducing people in every directions
  • Acolyte
  • *
  • Posts: 472
    • ccMIxter / Vidian
Label
« on: October 19, 2007, 06:05:46 PM »
I thought "Label" was just a way to put a random number somewhere.
Then I saw, "Go to Label".

Does anyone know what Label and Go to Label actually do?
Logged
- - - - YEAH BITCHEZ LETS STORM THE BRIDGE - - - -

Offline ZeroKirbyX

  • has died of dysentery.
  • Sage
  • *
  • Posts: 6,132
  • Boop a Doop a Doop
(No subject)
« Reply #1 on: October 19, 2007, 07:44:30 PM »
If you input "Labe one" then have a message say "Hi" and after that have "Go to label one" it jumps to that point in the command.
Logged

Offline aboutasoandthis

  • Exemplar
  • *
  • Posts: 1,915
  • Talking sucks.
(No subject)
« Reply #2 on: October 19, 2007, 08:08:34 PM »
I guess the two topics thing was an accident. Labels are basically loops that are a little easier to control.

With a Loop it would look like this:
- Loop:
-- Conditional Branch: If Variable:0001 is Greater Than or Equal To 1
--- < Nothing >
-- Else Case:
--- Break Out of Loop
- End Loop:

With Labels it would look like this:
- Label 1:
-- Conditional Branch: If Variable:0001 is Greater Than or Equal To 1
--- < Nothing >
-- Else Case:
--- Jump to Label 2
- Jump to Label 1:
- Label 2:

They're not completely interchangeable though. You just have to experiment to figure out which one works the best.

Quote
Originally posted by lilsniffs3
You made two topics.

Label is a checkpoint in an event.
Go to label returns the player to the checkpoint.
Logged
My pokemon bring all the nerds to the yard, and they're like you wanna trade cards? Darn right, I wanna trade cards, I could trade this, but not my charizard.  



Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
(No subject)
« Reply #3 on: October 20, 2007, 12:55:24 AM »
Long story short, you put a label somewhere in your code, and then when you want to go back to that segment in your code, use the go to label command.

Though in "good" programming, the label and goto label should never be used. Then again, in rm2k3 there are no methods, classes, or objects or anything like that, so sometimes your better off using it.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Ganocide_of_a_Kingdom

  • People's Salvation To Ignorance
  • Associate
  • *
  • Posts: 105
(No subject)
« Reply #4 on: October 20, 2007, 02:40:56 PM »
I find Labels useful. It gives you more control over yer code in my opinion. Loops are okay, but not that easy to control. I find labels much flexible to work with, specially with a CMS. I used to use loops for CMS' but then I found labels and changed over to them.  :firefox:
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Label
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum