Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by jcl. 07/22/26 06:42
ZorroGPT
by TipmyPip. 07/21/26 17:54
New Zorro version 3.11
by jcl. 07/21/26 13:42
Lapsa's very own thread
by Lapsa. 07/18/26 13:40
Purchase A8 full licence version
by ukgamer. 07/17/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (1 invisible), 1,558 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Draw_text problem #260247
04/09/09 17:55
04/09/09 17:55
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Hello guys what wrong with this?? i cant figure out...

i made a function for debugging.. and each time i call it, there is this string that is shown on screen, and i added a variable to make it scroll down so they wont overlay.

The problem is.. im calling the function with diferent parameter, and they apeaar all the same? What im doing wrong??

var sn_y=88; //pos on screen y
void show_number(var dx){
sn_y+=15;
var sn2=sn_y+15;

STRING* tt="#100";
str_for_num(tt,dx);

while(1){
draw_text(tt,300,sn2,vector(90,90,90));
wait(1);}
}

then i call on main:
show_number(10);
show_number(50);
show_number(100);

BUt the result on screen is :

100
100
100

and not
10
50
100

Why?

Last edited by MMike; 04/09/09 18:10.
Re: Draw_text problem [Re: MMike] #260251
04/09/09 18:06
04/09/09 18:06
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
var sn_y=88;
var multiplier=0;

void show_number(var dx){
STRING* tt="#100";
multiplier++;
str_for_num(tt,dx);
var a = sn_y + (15 * multiplier);
while(1){
draw_text(tt,300,a,vector(90,90,90));
wait(1);}
}

Last edited by Michael_Schwarz; 04/09/09 18:06.

"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Draw_text problem [Re: Michael_Schwarz] #260252
04/09/09 18:11
04/09/09 18:11
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Yeah Michael i got it now, but now the problem is different, read again the post, because i edited... sorry.. I cant make the show the different values! they all pooint to the last one

Re: Draw_text problem [Re: MMike] #260253
04/09/09 18:25
04/09/09 18:25
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
omg .. its not logical. i dont know wwhats happening, does it goes well with you?

Re: Draw_text problem [Re: MMike] #260255
04/09/09 18:44
04/09/09 18:44
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
i would go for a string array about now... would limit the number of element you can show, but it also takes away lots of frustration.


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Draw_text problem [Re: Michael_Schwarz] #260268
04/09/09 21:01
04/09/09 21:01
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
but why is happening? it sholdnt behave that way

i declare a internal string, and the text displays that string , its not an global string? is this a bug or something? in not on the text draw.. its on another things..its an internal problem that must be a bug. i will report.

>>because check this:

void return_number(var number){
STRING* tt="number";
str_for_num(tt,number);
while(1){error(tt); wait(1);}
}


now on main...

return_number(10);
return_number(20);

This should make the engine , error output 10, and then 20, and then 10 and then 20, endless.. but thats not what happens, you get, 10, then 20, then 20 forever, 10 will disapear wuhuhu..

Re: Draw_text problem [Re: MMike] #260281
04/09/09 22:57
04/09/09 22:57
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
HAve a look in you bugs post....
Your return_function is bad.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Gamestudio download | 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