|
1 registered members (AndrewAMD),
1,248
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Expert
|
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: jcl]
#302074
12/16/09 13:06
12/16/09 13:06
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
OP
Expert
|
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: Bunsen]
#302088
12/16/09 14:39
12/16/09 14:39
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
OP
Expert
|
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
MichaelGale
Serious User
|
Serious User
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
OP
Expert
|
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
|
|
|
|
|
|