Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (frutza, Quad, AndrewAMD), 385 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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