Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Grant, AndrewAMD, ozgur, Quad, TipmyPip), 29,980 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Whats up with "file_str_writeto"? #301939
12/15/09 14:48
12/15/09 14:48
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Dunno if this belongs in "Blame the Manual" but cant see where else it fits.

Is the "file_str_writeto" function in experimental stage or something?
Its listed in the manual with "file_str_write" and there is no mention of experimental there.
And if I include it in my code I get "undeclared identifier" errors.
And I cant find any reference to it in "Bugs".
[PS:: Im running 7.80.0 commercial]

So whats the go guys ....?
Thx.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Whats up with "file_str_writeto"? [Re: EvilSOB] #302054
12/16/09 09:57
12/16/09 09:57
Joined: Jul 2000
Posts: 28,029
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,029
Frankfurt
You're right, this function was indeed missing in the header (afuncs.h).

If you need it now, you can add it yourself:

EXT_var F(file_str_writeto)(var handle,char*,var length);

Re: Whats up with "file_str_writeto"? [Re: jcl] #302074
12/16/09 13:06
12/16/09 13:06
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
When I try that I just get an "empty prototype" error on execution.

FYI:: The code Im using is as follows...
file_str_writeto(f, (char*)player.skill5, sizeof(CAR));

Where
var f = file_open_write(...);
typedef struct{...}CAR;
player.skill5 = sys_malloc(sizeof(CAR));


Sounds like this is something more than just a missing header entry.
Looks like I may need to wait for the next public release...


Last edited by EvilSOB; 12/16/09 13:07. Reason: typo fixed in example code

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Whats up with "file_str_writeto"? [Re: EvilSOB] #302080
12/16/09 13:52
12/16/09 13:52
Joined: Apr 2009
Posts: 33
Germany
B
Bunsen Offline
Newbie
Bunsen  Offline
Newbie
B

Joined: Apr 2009
Posts: 33
Germany
Copy the 2 lines to your code before calling the function:

API(file_str_writeto,acknex)
var file_str_writeto(var,char*,var);

Re: Whats up with "file_str_writeto"? [Re: Bunsen] #302088
12/16/09 14:39
12/16/09 14:39
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Ive written my own read and write versions now, no biggie.
file_str_writeto now works but keeps terminating the buffer-read early
even though I specify "" as delimiter (ie no delimiter).
Dunno if its actually a bug or not, cause I didnt test it very thoroughly.

It is interesting that Bunsens 2 lines allows compile and execution,
but JCL's one liner doesnt...

Anyone know why? Just curious, as Ive written new code now.
Its not a time-critical area so in-efficient code is not important...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Whats up with "file_str_writeto"? [Re: EvilSOB] #302112
12/16/09 18:26
12/16/09 18:26
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
I might be wrong, but shouldn't it be

EXT var

rather than

EXT_var

?


Your friendly mod is at your service.
Re: Whats up with "file_str_writeto"? [Re: MichaelGale] #302137
12/16/09 21:49
12/16/09 21:49
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Yeah, it was MichaelGale.
I guess JCL put in the "_" to show a required space.


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

Moderated by  aztec, Inestical, Matt_Coles, Tobias 

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