Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / problems writing string to files in tier2 on Agk classic and Agk studio..

Author
Message
SkinK4ir3
8
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 4th Aug 2023 20:03
I'm trying to write strings in files both in agk classic tier2 and in agk studio tier2 none of the writing functions work... what am I doing wrong?

mycode >
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 5th Aug 2023 11:39 Edited at: 5th Aug 2023 12:21
Try prefixing it with "raw:" in your path.
const char* filePath = "raw:C:\Games\myfile.txt";
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
qweQua
1
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 7th Aug 2023 11:23
What is agk::GetRenderer? i can't find it in the help file or in the tier 2 source code. Do you mean agk::GetRendererName? If you do why is it in a if statement?
SkinK4ir3
8
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 7th Aug 2023 23:12 Edited at: 7th Aug 2023 23:21

Now I have the following problem, I can't write to files inside the CurrentDir

I can't get the current path to open files inside the path where the executable is...


how do i solve this?
SkinK4ir3
8
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 7th Aug 2023 23:22
qweQua wrote: " What is agk::GetRenderer? i can't find it in the help file or in the tier 2 source code. Do you mean agk::GetRendererName? If you do why is it in a if statement? "


this is default of AppGameKit Studio Tier2
qweQua
1
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 8th Aug 2023 09:05
Hmm... The linux template for studio doesn't have this...
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 8th Aug 2023 17:42 Edited at: 8th Aug 2023 17:43
Quote: "I can't get the current path to open files inside the path where the executable is..."


You can use GetReadPath.
AppGameKit Documentation wrote: "
GetReadPath

Description

Returns the directory that contains the application executable on the current platform that the app is running on. Note that on Android this path is inaccessible in normal use and will return an empty string. "
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
SkinK4ir3
8
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 10th Aug 2023 14:26
wow, awesome !!
thanks u

Login to post a reply

Server time is: 2024-05-08 00:19:59
Your offset time is: 2024-05-08 00:19:59