≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
save an existing variable to an external .txt file or .INI file.
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: If you are struggling to write a script for writing out that content of your file, it will probably get very difficult for you to read it, because this would involve even more complex code (parsing ini files isn't that simple). But to start, for writing out that file, it would look like this: [code] var varContent = ccbGetCopperCubeVariable('score'); var iniFileContent = 'score='; iniFileContent += varContent; iniFileContent += '\n'; ccbWriteFileContent('saved.ini', iniFileContent); [/code] I haven't tried this, but I think it should work. Note that on newer versions of Windows, it is not allowed to write into certain directories, so the file will end up somewhere else, if it is for example installed in "C:\program files", but this is virtualized, so for the game, it should work anyway, you might just not see the file at the location of your game.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact