Help with array within structures

Advanced game related topics
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

You're welcome! :D
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Num3 wrote:Don't go hard on the guy, we are all noob's at something...

Structures and linked lists puzzled me too for quite some time.
Not many basic dialects have those.

Just for fun, try to do this same thing in BlitzMax...
That's the reason i dumped it, takes too much time to work with linked lists :twisted:

robert1352, don't feel bad about this... it takes time to learn how to speak purebasic :P
I agree with you, also on BlitzMax. I think its quite a crude language, as BlitzBasic was and always will be :lol: . Things surely can be done with them, but never the "right" way (my right way is where software is bloatless and every byte has a purpose to live for). Dont get me wrong though.

But yes, Before working on actual code with structures, play with them, until you understand the whole thing and you're confident enough to move on.
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
robert1352
User
User
Posts: 34
Joined: Tue Mar 14, 2006 8:17 pm

Good advice!

Post by robert1352 »

Yeah, even though im still a noob with purebasic ive learned a lot from this project im working on.I guess its true what they say"the best way to learn is by doing". :wink:
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

Wouldn't this work a little easier?

Code: Select all

ForEach mys()
 DisplayTransparentSprite(mys()\Type,mys()\X,mys()\Y)
Next 

Demivec
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Well..., errr..., I think..., actually, yes!

What the heck, am I gettin' old? Altough it wouldn't make "a hell of a difference" you are still right.

Thanks for pointing it out. :wink:
robert1352
User
User
Posts: 34
Joined: Tue Mar 14, 2006 8:17 pm

no subject

Post by robert1352 »

whats the difference between this:

ForEach mys()
DisplayTransparentSprite(mys()\Type,mys()\X,mys()\Y)
Next

and this:

While NextElement(ghost())
displaysprite(ghost()\sprite, ghost()\x, ghost()\y)
Wend


are there any diffrences I should be aware of,because this is what I have in my code??
Post Reply