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
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 1 invisible), 1,085 guests, and 6 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
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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | 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