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 / Max # of Load/Paste Image

Author
Message
SpacepiG
15
Years of Service
User Offline
Joined: 18th Nov 2009
Location:
Posted: 19th Nov 2009 05:34
Hi, i feel pretty dumb but can i only use up to 9 images?

For my menuscreen i will use quite more but it continuosly fails for me once i try to paste image 10 or higher.

No errors, the pictures just wont show up.
Any ideas?

(i did search but did not find a solution)
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 19th Nov 2009 08:45
you can use hundreds of images in DBP.

Show us some code and we'll see where your going wrong

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Nov 2009 14:32
You may be pasting them off-screen.

Like =PRoF= says, without your pasting code, we can't help.

TDK

SpacepiG
15
Years of Service
User Offline
Joined: 18th Nov 2009
Location:
Posted: 19th Nov 2009 16:24
Sorry, i solved it using the extended

This is similar to what my code looked like before i changed it



The paste part did not work when i used a double digit number such as 10. However when i changed it to extended i got around the problem. by giving personalized names (ie. Menu1 = IMG Load Image( "images\menus\menu_h_01.png") )
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2009 18:10
The code in the snip should of worked. You shouldn't of had to make variables just to use double digit image numbers. Are you running the latest version of Darkbasic Pro?

http://darkbasicpro.thegamecreators.com/?f=upgrades

SpacepiG
15
Years of Service
User Offline
Joined: 18th Nov 2009
Location:
Posted: 19th Nov 2009 19:07
Supposedly i am.
It tells me it is the latest when i do check for upgrade.
I bought it last week and downloaded/installed the upgrade.

I tried to replace the image with a singledigit to verify position etc and then it worked.

Does not really matter since i actually prefer the extend due to being able to use a name i can recognize anyway.

Are there any drawbacks of using extend?
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 19th Nov 2009 21:15
I always use variable for the names of objects and images. It makes it easier for me to read through and understand what is going on in my code. Most of the time, I don't even know what the object number or image number of anything is since I usually run functions that just find free numbers:



There's something in this room that makes you can't speak well.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Nov 2009 03:20 Edited at: 20th Nov 2009 03:43
Quote: "Are there any drawbacks of using extend?"


The only drawback is if you spell it wrong. Since we can create any variable on the fly a misspelled variable name would be zero and thus produce an error since image number zero would never exist.

I wonder if an array would give you the same problem.



SpacepiG
15
Years of Service
User Offline
Joined: 18th Nov 2009
Location:
Posted: 20th Nov 2009 20:57
I changed direction using the xgui for my menuscreen.
Thank you all for the help though.

Login to post a reply

Server time is: 2024-11-24 22:59:17
Your offset time is: 2024-11-24 22:59:17