Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stuck in struct #349228
12/05/10 09:08
12/05/10 09:08
Joined: Apr 2010
Posts: 23
G
GieskeBon Offline OP
Newbie
GieskeBon  Offline OP
Newbie
G

Joined: Apr 2010
Posts: 23
I've got some problems about structs.

What I want is a struct with different type of weapons.

Quote:

typedef struct
{
char* name[25];
var min_damage;
var max_damage;
var level_weapon;
} weaponlist;


So far so good. Now I want add some weapons to this.

So I put after this code.

Quote:

weaponlist item[4];


Correct me if I wrong, but now I have 5 items (from 0 to 4) with a min_damage, max_damage and a level_weapon. So it looks like this:

Quote:

item[0].min_damage
item[1].min_damage
etc.
etc.
item[3].level_weapon
item[4].level_weapon

Ok, my question is 'how to link them together'. So if I choose the first item then want to know whats his min / max damage is and his level. Example name = "Axe of 3DG", min_damage=1, max_damage=5 and level_weapon=3;

So it looks like this then
Quote:

item[0].name = "Axe of 3DG";
item[0].min_damage; = 1;
item[0].max_damage; = 5;
item[0].level_weapon; = 3;




Does someone know how to link together? I want all the digits in a PANEL.

Cheers
Dave

Last edited by GieskeBon; 12/05/10 09:16.
Re: Stuck in struct [Re: GieskeBon] #349245
12/05/10 11:37
12/05/10 11:37
Joined: Apr 2010
Posts: 23
G
GieskeBon Offline OP
Newbie
GieskeBon  Offline OP
Newbie
G

Joined: Apr 2010
Posts: 23
I solved it myselve after 1,5 day laugh

Thanks for reading

Last edited by GieskeBon; 12/05/10 11:38.

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1