Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What's an Enum [Part-One]

Featured Replies

I just noticed in your example enum, you've capitalized Ten, but not the rest of the numbers. my OCD is killing me.

ss2014-03-26at123229_zps0944f9fe.png

Use the keyword this for get methods for consistency and redundancy, it makes it easier to see which variable you're actually accessing (I know most if not all IDE's will make sure they are the same color anyways).

  • Author

I just noticed in your example enum, you've capitalized Ten, but not the rest of the numbers. my OCD is killing me.

ss2014-03-26at123229_zps0944f9fe.png

Use the keyword this for get methods for consistency and redundancy, it makes it easier to see which variable you're actually accessing (I know most if not all IDE's will make sure they are the same color anyways).

Lol I'll fix it when I get home

public enum Number

 

Enums shouldn't be plural.

 

Number.FIVE vs Numbers.FIVE

 

Enums shouldn't be plural.

 

Number.FIVE vs Numbers.FIVE

 

This is only true if the fields inside the enum are not bit fields.

 

 

 

Edited by Sigma

 

 
 

This is only true if the fields inside the enum are not bit fields.

 

 

 

 

Plural enums really bother me. I just think they look weird.

  • Author

Plural enums really bother me. I just think they look weird.

public enum Number

This is only true if the fields inside the enum are not bit fields.

I understand where your coming from, but to have to redo all the picture because of one spelling is a bitch

Edited by josedpay

I understand where your coming from, but to have to redo all the picture because of one spelling is a bitch

 

does that look like a bit field to you?

  • 1 month later...
  • Author

Started working on this again. I removed the picture and added in the code. Easier for me to edit, rather then having to retype, edit, and upload the picture. Which was a hassle.

Edited by josedpay

It might be better if you used runescape related enums.

Such as making an example Magic enum, and passing in the Spell.CAMELOT_TELEPORT or something into it.

That way you can give scripters an area that they'll be able to see its usefulness, and easily integrate it into their scripts.

 

Making an enum for Numbers isn't very useful at first glance. I realize it's an example, but if you put it into runescape terms people might understand how powerful enums can be.

  • Author

It might be better if you used runescape related enums.

Such as making an example Magic enum, and passing in the Spell.CAMELOT_TELEPORT or something into it.

That way you can give scripters an area that they'll be able to see its usefulness, and easily integrate it into their scripts.

 

Making an enum for Numbers isn't very useful at first glance. I realize it's an example, but if you put it into runescape terms people might understand how powerful enums can be.

 wink.png  lol alright, ill probably just leave the number enum. but add in a runescape section. 

Edited by josedpay

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.