Gamestudio Links
Zorro Links
Newest Posts
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Item array type thing... I'm not really sure #154014
09/14/07 04:32
09/14/07 04:32
Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
openfire2691 Offline OP
Junior Member
openfire2691  Offline OP
Junior Member

Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
I was working on adding items to my game and I was wondering if there was an easier way to do it. I need to add information like the name and function name in it as well as numbers like the amount of space it takes up in the inventory, but I want it all to be in one place, sort of like a folder so that I can just use the name and call on the data. I guess it would kind of be like a variable with multiple fields that I can call on like: var itemname[4] = name, function, size, uses;. The only problem is that I'm pretty sure that wouldn't work. How can I make this easier?


When your script isn't working right, usually it's because it's doing exactly what you told it to. -An Unknown Programmer
Re: Item array type thing... I'm not really sure [Re: openfire2691] #154015
09/14/07 09:09
09/14/07 09:09
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline

User
adoado  Offline

User
A

Joined: Jul 2006
Posts: 503
Australia
In Lite-C A struct could be used. For C-Script, I guess the best option is to use an array, or maybe its possible to save the "item data" to plain text files, and dynamically open them at runtime..

Hope it helps,
Adoado.


Visit our development blog: http://yellloh.com
Re: Item array type thing... I'm not really sure [Re: adoado] #154016
09/14/07 23:55
09/14/07 23:55
Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
openfire2691 Offline OP
Junior Member
openfire2691  Offline OP
Junior Member

Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
A struct is exactly the kind of thing that I need. I guess I just need to set it up as an array. Thanks anyways.


When your script isn't working right, usually it's because it's doing exactly what you told it to. -An Unknown Programmer
Re: Item array type thing... I'm not really sure [Re: openfire2691] #154017
09/15/07 05:23
09/15/07 05:23
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline

User
adoado  Offline

User
A

Joined: Jul 2006
Posts: 503
Australia
You could switch to Lite-C, or maybe if you can, write a DLL to assist you.


Visit our development blog: http://yellloh.com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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