Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / help with storing and retrieving array data

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 21st Nov 2010 21:16
High using dbpro.
making a simple text bases editor to make it easier to set up a map

I don't know how to use an array but im pretty sure that's what i need for this.

need to be able to store texture data or texture name
and the new object name assigned or just the object num i guess

basic example

if mousex()<10 and mousey >1000 and mouseclick()=1
print "rename object"+str$(pick object mouse()x,mousey(),1,400)
input= newobjname$
when enter is presses i need it to throw the new object name into a array and other object data object name$+texturenum+objnum
so next time i click on an object i can pull out the name of it and the texture ect

A child's dream never dies.
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 22nd Nov 2010 07:42
Quote: "I don't know how to use an array"


Well I suggest you start here

http://forum.thegamecreators.com/?m=forum_view&t=96069&b=7&p=0

A clever person solves a problem, a wise person avoids it - Albert Einstein
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Nov 2010 17:05
An array of this sort would need to be made using a UDT (User Defined Type). Like this:



Then if you want to put stuff into or take stuff out of the array:



Using UDT's you can store different data types like strings and floats in one array.

Hope that helps!

Login to post a reply

Server time is: 2024-09-29 00:18:01
Your offset time is: 2024-09-29 00:18:01