It is currently Mon May 20, 2013 5:14 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: WindowedScreen.pb example doesn't work
PostPosted: Tue May 01, 2012 11:32 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 203
Location: Slovenia
Am i supposed to on the fly by myself change stuff or why most of examples don't work ?

Well error is at line 82 to 86, failed to initialise sprite.

How can i learn PB with this error poping up on every second example that i try...


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Wed May 02, 2012 3:37 am 
Offline
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2852
Location: Wales, UK
Actually, trying to work out why a piece of code does not work is a very good way to learn a language!

I think the IDE is probably telling you what is wrong.

In the message box: [ERROR] The specified #Sprite is not initialised

At line 23, a '!' highlight flag.

The path to the sprite image file 'PureBasicLogo.bmp' needs to be edited to either where that bmp really is on your PC (for example, on my PC: "C:\Program Files\PureBasic460\Examples\Sources\Data\PureBasicLogo.bmp"), or a path to your own image file.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Wed May 02, 2012 11:33 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 203
Location: Slovenia
I edited the path before i posted, to desktop location of a sprite of my own, where i also saved the example, but it's still exactly the same error, except that now the sprite location is not error but is working.

EDIT: So png doesn't work i guess... is there any way to load a .png format out there ?


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Wed May 02, 2012 12:39 pm 
Offline
User
User

Joined: Sat Feb 18, 2012 10:21 pm
Posts: 80
Location: Leicestershire
Hi Primoz128, I will try and help as much as i can!

To use png image's you must first call "UsePNGImageDecoder()"
This then will decode the png format and display them.

Show me the code that you are using and i will sort it for you.

_________________
P.N.


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Wed May 02, 2012 12:45 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 203
Location: Slovenia
Pot Noodle wrote:
Hi Primoz128, I will try and help as much as i can!

To use png image's you must first call "UsePNGImageDecoder()"
This then will decode the png format and display them.

Show me the code that you are using and i will sort it for you.


i should have posted before you did, cause i found how to get this to work using the same function you posted :).

PB rocks: Smallest language of all; i think maybe fastest too <.< if not it has inline assembly so it must be; community <.< :O.


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Wed May 02, 2012 1:03 pm 
Offline
User
User

Joined: Sat Feb 18, 2012 10:21 pm
Posts: 80
Location: Leicestershire
Glad you got it working :)

P.N.

_________________
P.N.


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Thu May 03, 2012 3:32 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 203
Location: Slovenia
And whats the difference between UsePNGImageDecoder() and Encoder ?


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Thu May 03, 2012 3:47 pm 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1563
Location: Germany
Again: It's all in the help file... UseXXXDecoder() for loading, UseXXXEncoder() for saving when using LoadImage() / SaveImage() (or LoadSound() etc.).


Top
 Profile  
 
 Post subject: Re: WindowedScreen.pb example doesn't work
PostPosted: Fri May 04, 2012 12:10 am 
Offline
User
User

Joined: Sat Feb 18, 2012 10:21 pm
Posts: 80
Location: Leicestershire
Same :wink:

_________________
P.N.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Little John, PhilR1 and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye