Scripts / [SOLVED] Write to file problem

Author
Message
pippo92
11
Years of Service
User Offline
Joined: 20th Mar 2013
Location:
Posted: 30th Nov 2019 19:44
Hi, i have a question: why doesn't this code write to a file?









The author of this post has marked a post as an answer.

Go to answer
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Nov 2019 22:54
This does and it looks very similar:

Been there, done that, got all the T-Shirts!
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 1st Dec 2019 12:22
This post has been marked by the post author as the answer.
Quote: "Hi, i have a question: why doesn't this code write to a file?"

1- Do you means you are getting a blank file?
2- You are not getting the file?
If so, look for "textfile.txt" file, in the "files" folder.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
pippo92
11
Years of Service
User Offline
Joined: 20th Mar 2013
Location:
Posted: 1st Dec 2019 13:55
ok i solved it. in practice I could not generate the text file because it saved me by default on Gameguru / Files. thanks a lot to everyone for the help
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 4th Dec 2019 17:53
This is certainly the kind of thing I want to start trying out next for my game projects. So I can make use of the level clearing and reference an external file for all the needed variables going forwrad to next levels.
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 5th Dec 2019 22:14
Quote: "So I can make use of the level clearing and reference an external file for all the needed variables going forwrad to next levels."

https://forum.game-guru.com/thread/221038
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-12-22 09:13:59
Your offset time is: 2024-12-22 09:13:59