Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
ccbReadFileContent is not Defined

devdot
Registered User
Quote
2011-12-22 05:52:12

I have coppercube 3.0.1 and it is registered. but why does ccbReadFileContent provide the error?

script:82:ReferenceError:ccbReadFileContent is not Defined


Here is the function I am executing when I press the letter G.

function LoadDialogFiles()
{
var fileName = "LevelOne.txt";
var fileData = ccbReadFileContent("LevelOne.txt");

var fileBlocks = fileData.split('*');
var blockCount = parseInt(fileBlocks[1].substring(1, fileBlocks[1].IndexOf('\n')));
print("loadDialogFiles() test: " + blockCount);


}



devdot
Registered User
Quote
2011-12-22 07:02:24

It is clear to me now that it is a bug in your build. Please release a patch.

ccbReadFileContent(filename)

reads a full (text) file into a string


cccWriteFileContent(filename, content)

writes a full (text) file from a string


Be sure both of those work. Also why is the WriteFileContent prefixed with ccc rather than ccb?


devdot
Registered User
Quote
2011-12-22 07:34:01

ok you need to update your documentation.

you neglected to add Lib in the middle of those functions .

ccbLibReadFileContent
ccbLibWriteFileContent


niko
Moderator
Quote
2011-12-22 13:09:54

Ah, you are right, this is a mistake. The function should have been named as written in the documentation, 'ccbReadFileContent', without the 'Lib'. This will be corrected in the next update. Thanks for posting!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

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