srtuct?? ( kinda stupid question)
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
jesusfreak

upon loading up the home page for verge-rpg. i saw a nre version of vcc.. they said it had struct support...
what is that??



People that are usually nice too me JRN arias mythrill the speed bump steven marine KarmaCult Loritian tralu the gerf

Posted on 2000-11-18 00:59:01

Mythril

If you don't know what it is, you probably don't need it...



Posted on 2000-11-18 03:10:32

Tarvok

A struct (short for structure) is a special variable that contains other variables, so they can be kept together in a logical format. I'm bad at explaining, so here's an example.

Suppose you want to keep track of the stats for a player character in the game. You could create a strcuct called PC, and include things like strength (STR), intelligence (INT), spell ability, etc. all in this struct. Code example:

Well gee. I guess it's not in the docs, meaning it's unsupported. Don't even try to use it unless you know what you're doing. It's right up there next to pointers (which should be removed, IMO).

In C, it would be done like this:

struct Hero
{ int STR; //this would influence how hard they hit
int INT; //magical ability, possibly skills
int magic; // 0 for none, 1 for wizard, 2 - priest?
int weapon; //references an integer list of weapon
//... and so on
}

it would be declared like this (I think):

Hero Darin;

individual members would be accessed like this

//level up

Darin-STR = Darin-STR+1

It's been a while, so this could be wrong. You should also be thouroughly confused now. Until they include it in the docs, dont worry about it. Unsupported features can cause *bad* problems.

- Tarvok




Posted on 2000-11-27 13:16:33

Tarvok

Well, it looks like the message board can't handle my forward arrow (a greater than sign after the -). So those examples are entirely wrong. :-\

- Tarvok



Posted on 2000-11-27 13:18:06


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.