Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, M_D), 1,217 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Handling E1115 error (and others...) inside the program #420958
04/07/13 16:39
04/07/13 16:39
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
My application shows various external images picked up from hard disk.
Unfortunately, sometimes a file has bad format.
In this case i would like that if the program doesn't pop up a silly message and dies immediatly after hitting the enter key.
In my dreams, my lite-c code would handle such cases, would show own message, and wouldn't die.
Just continue the work.
What should i write in my code to do this?
Thanks in advance.

Re: Handling E1115 error (and others...) inside the program [Re: Aku_Aku] #420988
04/08/13 09:10
04/08/13 09:10
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
maybe it can help you:

if the error happens on image loading/creation:
set warn_level to 0, in theory it surpresses all error messages.

if the error message happens on image manipulation:
you can get the image format by bmap_lock and use bmap_to_format to convert them to a suitable format, like 888 or 8888 from dds for pixel manipulations.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Handling E1115 error (and others...) inside the program [Re: sivan] #421007
04/08/13 13:59
04/08/13 13:59
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I don't think setting warn_level to 0 will suppress error messages, only warnings. But try it anyways!


Always learn from history, to be sure you make the same mistakes again...
Re: Handling E1115 error (and others...) inside the program [Re: sivan] #421027
04/08/13 17:41
04/08/13 17:41
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
Thanks for the idea, i will try it.

Re: Handling E1115 error (and others...) inside the program [Re: Aku_Aku] #421030
04/08/13 19:36
04/08/13 19:36
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
My way:
Hook MessageBoxA and read the error (split it down to one or two words) and use a simple if condition to filter the msg. You can also block the msgbox if you dont call the orig function!
This method works 100% laugh

Last edited by Ch40zzC0d3r; 04/08/13 19:36.
Re: Handling E1115 error (and others...) inside the program [Re: sivan] #421082
04/09/13 18:02
04/09/13 18:02
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
Sivan, warn_level=0 didn't help.
The issue is the same.

Re: Handling E1115 error (and others...) inside the program [Re: Aku_Aku] #421090
04/09/13 21:52
04/09/13 21:52
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
How do you load the image (which lite-c function do you use)?


no science involved
Re: Handling E1115 error (and others...) inside the program [Re: fogman] #421092
04/09/13 22:08
04/09/13 22:08
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
Code:
bmap_1=bmap_create(_chr(str_File));


Re: Handling E1115 error (and others...) inside the program [Re: Aku_Aku] #421095
04/10/13 06:46
04/10/13 06:46
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
I´ve had the same problems in past. Do you have the error only with specific file extensions, like tga? In this case, you could try to use
bmap_load(BMAP*,char* name,var mode)
for these extensions.


no science involved
Re: Handling E1115 error (and others...) inside the program [Re: fogman] #421136
04/11/13 16:47
04/11/13 16:47
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
The file extension is irrelevant, i can have tga files with bga, txt, tundra, werewolf or chips or other extensions.
Naturally, i tried the bmap_load, it gives E2000.

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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