Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (lijoyi2011), 1,034 guests, and 2 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
str_trunc and str_clip #325998
05/29/10 16:52
05/29/10 16:52
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
Both functions are not working in A7.84. They don't change the string in any way. Here is a simple test code that shows the problem:

Code:
#include <acknex.h>
#include <default.c>


TEXT* test_txt = {
	layer = 2;
	pos_x = 300;
	pos_y = 150;
	red = 255;
	green = 255;
	blue = 255;
	font = "Arial#30b";
	strings = 1;
}

var det1 = 0;
var det2 = 0;
var det3 = 0;
function main() {
  video_mode = 6;	 
  video_depth = 32; // 32 bit colour mode
   wait(1); //Load Video device  
   set(test_txt,SHOW);
   wait (3);
   str_cpy((test_txt.pstring)[0],"Ein test!");
   det1 = str_len((test_txt.pstring)[0]);
   wait(-1);
   str_trunc((test_txt.pstring)[0],2);
   wait(1);
   det2 = str_len((test_txt.pstring)[0]);
   wait(-1);
   str_clip((test_txt.pstring)[0],4);
   wait(1);
   det3 = str_len((test_txt.pstring)[0]);
   while(1) {
   DEBUG_VAR(det1,10);
   DEBUG_VAR(det2,50);
   DEBUG_VAR(det3,90);
   wait(1);
   }
}



Re: str_trunc and str_clip [Re: RedPhoenix] #326189
05/30/10 23:10
05/30/10 23:10
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Which version? (check full number in the setup.log file)

Works fine for for me with V7.84.2 commercial...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: str_trunc and str_clip [Re: EvilSOB] #326285
05/31/10 13:51
05/31/10 13:51
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Both functions are working in 7.84 and 7.85. Possibly not in an interim beta.

Re: str_trunc and str_clip [Re: jcl] #326311
05/31/10 15:27
05/31/10 15:27
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
My version number is 7.85.3 sorry
I forgot about the update because of the multiplayer -cl bug.

EDIT: I downloaded the update from this source:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=325384&page=1

There it's called A7.854 so I guess you changed that post and the download version after I downloaded it. I will now download the A7.854 version and check whether the problem still exists.

SOLVED: Everything works fine in A7.854.

Last edited by RedPhoenix; 05/31/10 15:43.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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