|
Re: Gamestudio 8.30.4 Public Beta
[Re: painkiller]
#385804
10/24/11 11:31
10/24/11 11:31
|
Joined: May 2008
Posts: 257
djfeeler
Member
|
Member
Joined: May 2008
Posts: 257
|
Hello, I have detect an error on an example reactiontest. When the number five appear et when I press the key five an error appear Malfunction W1501 Empty pointer in main and Error E1513 Script crash in main. I have test my project and this code does not work. In the other version it works well.
// fonction inkey write by djfeeler
#include <acknex.h>
#include <default.c>
FONT* arial_font = "Arial#20b";
STRING* GV_str_letter = "";
TEXT* Txt_temp = {strings = 20;}
TEXT* Txt_write = // appears over input_pan
{
layer = 30;
pos_x = 30;
pos_y = 10;
font(arial_font);
string(GV_str_letter);
flags = SHOW;
}
function F_write_text()
{
str_cpy(GV_str_letter, "#20"); // The error is here the #20 does not work.
set(Txt_write,SHOW); // display the text write
inkey(GV_str_letter); // retrieves the letters typed
str_cpy((Txt_temp.pstring)[0], GV_str_letter);
}
function main()
{
video_set(800,600,0,2);
F_write_text();
}
#20 appears and I can write three letters. Djfeeler
Last edited by djfeeler; 10/24/11 12:20.
|
|
|
Re: Gamestudio 8.30.4 Public Beta
[Re: djfeeler]
#385807
10/24/11 12:19
10/24/11 12:19
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
Programmer
|
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
@djfeeler: This is supposed to be like this: http://manual.3dgamestudio.net/bugs.htm"The '#' default size token had an effect not only on STRING definitions, but also (wrongly) on str_cpy operations (all A8, A7, A6, and A5 versions; fixed in 8.30.4)." Also see: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=385767This means you shouldn't use "#n" in str_cpy operations. The behaviour you expect was a bug! I guess the easiest workaround in this case would be to use
str_cpy(GV_str_letter, " ");
Now the editboxes in LBGUI will accept a '#' at the beginning of their text as they should. Thanks for fixing this.
|
|
|
|