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
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, degenerate_762), 642 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Font-crash #346957
11/10/10 21:01
11/10/10 21:01
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Hi, I've got a little problem with creating a font.
I wrote this code in one of my functions:

Code:
my_txt.font = font_create("my_font.bmp"); //create a font with a Bitmap



This works fine, when I test it.
But after publish, if I run the exe, it crashes.

This one works:
Code:
my_txt.font = font_create("arial#8");


So the problem must be at this line.

But there isn't something wrong with the bitmap-file,
because in another included script I created a font the same way (and the same Bitmap), but there it works.
It's really only in this Scriptfile and only after publish.

Has someone an idea, what the fu** is going on here? o.0
Thanks. laugh
LG
Hopfel


Hilf mir, dir zu helfen!
Re: Font-crash [Re: hopfel] #347312
11/14/10 12:46
11/14/10 12:46
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Nobody an idea?
Do you need some more code maybe?
I really don't know where the fault could be...
Would be really nice if someone can help.
LG


Hilf mir, dir zu helfen!
Re: Font-crash [Re: hopfel] #347316
11/14/10 13:26
11/14/10 13:26
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Is "my_font.bmp" included after publish?
Otherwise provide more code.

Re: Font-crash [Re: Pappenheimer] #347322
11/14/10 15:01
11/14/10 15:01
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Jep, and I included some other scripts which load the same font,
and there it works. So the file itself cant be the problem...
Ok, this code crashes (I used the real names of the pointer etc.):

Code:
TEXT* feld_txt = txt_create(1,2); //Erstelle den Text für den Textfeldinhalt
feld_txt.flags=VISIBLE;
feld_txt.font=font_create("write_font.bmp");



This makes a crash after Publish, without this lines it works, except I write it in the one included Scriptfile. There it works fine.
Erm...
This is the whole project, it would be great if someone can take his time to have a look on it:
www.haeschen.ch/hopfel/Panelelemente.zip

If you open the script "main.c" and test it, it works.
But if you start the exe it crashes.

The lines are:
scrollbalken.c
Line 305
This lines makes a crash (you can replace my_scr.filename1 with "write_font.bmp" and it wouldn't work after publish also)

and
textfeld.c
Line 655
This lines doesnt make one, but it's the same Bitmap-file




Hilf mir, dir zu helfen!

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