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
2 registered members (AndrewAMD, 7th_zorro), 935 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
invalid arguments in player_ctrl #268316
05/28/09 16:16
05/28/09 16:16
Joined: Feb 2008
Posts: 36
Pesaro, Italy, Europe
MaximilianPs Offline OP
Newbie
MaximilianPs  Offline OP
Newbie

Joined: Feb 2008
Posts: 36
Pesaro, Italy, Europe
i've made a panel where my text is scrolling via an ultra-elemental function. which copy a string to the next.

Code:
function logger(text)
{
	str_cpy(log_str1,"");		 // clear the string
	str_cpy(log_str1,log_str2);
	
	str_cpy(log_str2,""); 		// clear the string
	str_cpy(log_str2,log_str3);

	str_cpy(log_str3,""); 		// clear the string
	str_cpy(log_str3,log_str4);

	str_cpy(log_str4,""); 		// clear the string
	str_cpy(log_str4,text);
	wait(1);
}


the function will receive a string that will be copied to the line 4.
the problem is when the strings arent strings ! :-\

so my answare is: How can i brutally convert the value to a text that can be displayed ?

i mean, i wish to use some simply

logger("Erica say: hello");

but i can use also

logger(my.x);

i've tried something like
logger(str_cat_num(temp_str, "%.0f",my.x));

but the game give me the error:
invalid arguments in player_ctrl (which is the action that call the funcion)
frown

Re: invalid arguments in player_ctrl [Re: MaximilianPs] #268396
05/29/09 00:46
05/29/09 00:46
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Have you explored

TEXT*

or

PANEL*

both of these will in some way place text and numbers on the screen.

Ottawa smile

Re: invalid arguments in player_ctrl [Re: Ottawa] #268434
05/29/09 08:30
05/29/09 08:30
Joined: Feb 2008
Posts: 36
Pesaro, Italy, Europe
MaximilianPs Offline OP
Newbie
MaximilianPs  Offline OP
Newbie

Joined: Feb 2008
Posts: 36
Pesaro, Italy, Europe
Yep, i've tested booth of them but the problem is
how to convert value to strings, 'cause this thing "logger(str_cat_num(temp_str, "%.0f",my.x));" generate an error

Re: invalid arguments in player_ctrl [Re: MaximilianPs] #268452
05/29/09 09:37
05/29/09 09:37
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Couple of thing to try.
Code:
logger(_str(str_cat_num(temp_str, "%.0f", my.x)});

or

if you dont mind having to chop off or ignore a leading space
logger(str_cat_num(_str(" "), "%.0f", my.x));  
//the _str(" ") CANNOT change, must contain one space.



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

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