• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

FileStream with HTML5 not working?

Kelevra

New member
Joined
Mar 24, 2019
Messages
4
Hi all.

I have a bug that might just be local to me as it doesn't seem like anyone else on the forum has been having the same issue.

Basically, I'm having trouble with the FilesStream command when used in the 'Html5 game' in both release and debug. When I go to compile and run, it doesn't even get as far as the browser but opens up the filestream.cxs source file and points to about line 12 which says that "Native FileStream class not implemented." (it seems ok when running on the windows build etc).

I had a look at the LANG variable which governs the error and this is set to .js, so it is looking for the FileStream.js file in \Cerberus\modules\brl\native. Needless to say, the cpp, java, cs versions are there but no js version. Is this right? I did a quick google for FileStream.js and chucked in the first thing that came up, but it didn't work (no surprises but I had to try).

Am I missing something from the cerberus build/zip file? I've re-installed it with the latest but it's still not working for me. Anyone have any ideas?

Thanks for your time.

Cerberus:
Import mojo
Import brl.filestream

Class Game Extends App

    Method OnCreate()
        Print "OnCreate"
        Local myFile:FileStream = FileStream.Open("cerberus://internal/world.dat", "r")
        SetUpdateRate(30)
    End

    Method OnUpdate()
        Print "OnUpdate"
    End

    Method OnRender()
        Print "OnRender"
        Cls 0,0,0
    End

End

Function Main()

    New Game()

End
 
Filestream is not implemented in HTML5. It never was, since Monkey-X days.

And it probably never will, since Filestream is binary read/write access to local files and that is a big NO-NO on HTML. Security issues and all that.

On HTML5 you can only use LoadString and SaveString, which AFAIK uses cookies.
 
Back
Top Bottom