Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (alibaba, vicknick), 1,492 guests, and 4 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
Changes to string pointer? #262593
04/24/09 19:44
04/24/09 19:44
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
Just upgraded to 7.73.1 and it seems that compared to my previous engine version that string pointers have changed.

I used to be able to pass string pointers like this:

Code:
 
	STRING* gonzo = "test_str.txt";
	
	readfile(gonzo);


Now it gives me "invalid pointer" or something similar when I try to run it. I can't find anything in the manual. What's changed?


AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Changes to string pointer? [Re: silencer] #262613
04/24/09 21:41
04/24/09 21:41
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
file_str_read and file_str_write don`t search now in the savedir. They search in the Projectfolder.
You can use:
STRING* gonzo = "my_savedir\\test_str.txt"

Re: Changes to string pointer? [Re: silencer] #262614
04/24/09 21:42
04/24/09 21:42
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
IF the line STRING* gonzo = "test_str.txt"; was INSIDE a function, it was always bad,
but would survive compile and sometimes testing, but its still bad.

STRING* gonzo = "test_str.txt"; syntax is for global strings (outside a function)
STRING* gonzo = str_create("test_str.txt"); syntax is for local strings (inside a function)

IF you are using STRING* gonzo = "test_str.txt"; syntax as a global string, then I dont know whats up,
(I only have 7.73.0 but I dont have any issues like this)


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

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