Post Reply Home » Forums » EverQuest 2 » EverQuest 2 Premium Discussions

Programming question about Megabot 2.7 GlobalVar File : EverQuest 2 Premium Discussions

Posted: October 21st, 2005, 12:33 pm
loraik
What is the purpose of numbering the "const" like the following:

Code: Select all

const g_CON_GRAY=12
const g_CON_GREEN=13
const g_CON_BLUE=14
const g_CON_WHITE=15
const g_CON_YELLOW=16
const g_CON_ORANGE=17
const g_CON_RED=18

const g_FIGHTPARTNER=19
const g_HEALPARTNER=20
const g_BOTHPARTNERS=21
const g_OUTLOUD=22
const g_TOGROUP=23


What to the numbers that the var equals represent?

Loraik
Posted: October 30th, 2005, 10:56 am
richyrich
Only that the constants have to have a unique number that reference.

The reason is to make the script easier to read, that's all, the numbers are meaningless, just unique.

It's better then saying:
Concolor = 16

Means nothing when you read it, but if it says
Concolor = g_COn_YELLOW - ahh - now I know what that means!

Make sense?
Posted: October 31st, 2005, 6:32 am
loraik
So you can just call "16" instead of "g_COn_YELLOW"? But as you look thru the code you see that 16 is the code for yellow con?

LOL hope I said that right.. Trying to learn :shock:

Is there a VB for total ID10T'5?

Loraik
Posted: October 31st, 2005, 2:11 pm
richyrich
It's purely for easier to read code.

I need to assign and TEST variables to see what state they are in. You can compare to meaningless integers, or to a meaningul constant that represents an integer...
Want Advertisements After The Last Post Removed? Create A Free Account!
blue large dotWho is online
Users browsing this forum: Bing [Bot] and 16 guests
Post Reply