• 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

Data folder in Cerberus and Monkey

Gerry Quinn

Active member
Tutorial Author
Joined
Jun 24, 2017
Messages
184
Hi, I've been working with an old Monkey project but switched to Cerberus as I needed to create data buffers and I have a newer version of MSVC that Monkey doesn't work with. Anyway, when reading them (HTML, but I assume it's the same for all targets) I found that Cerberus expects the data folder to be identified as "cerberus://data/" - "monkey//data/" doesn't work.

I suspect an official work-around would be clunky, and anyway I can fix things myself without too much difficulty, now that I know the problem. Probably worth knowing for anyone experimenting with databuffers etc. I was wondering, though, if there's any elegant way to check whether Monkey or Cerberus was used to build a program - a preprocessor value perhaps?
 
Just to be clear that i understood it correctly...

monkey://data/ is not working?

Btw. There is a tool called CxConvert that I wrote long time ago to make an automatic conversion of monkey code.
 
Cerberus:
Strict


Import brl.databuffer


Function Main:Int()
     Local bufferA:DataBuffer = DataBuffer.Load( "monkey://data/a.dat" )
     Local bufferB:DataBuffer = DataBuffer.Load( "cerberus://data/b.dat" )
     Print "A:  "
     If bufferA   
         Print bufferA.Length()
     End
     Print "B:  "
     If bufferB   
         Print bufferB.Length()
     End
     Return 0
End
Yes: for example the following code running on HTML5 gives "Cerberus Runtime Error : NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'monkey://data/a.dat'." when I try to load a.dat, whereas b.data will load perfectly and give the correct length. (a.dat and b.dat are copies, and it's still the same if I switch them around).
 
Ah ok, yes, that is a small part, where CX in incompatible with Monkey X.
 
No problem - it's easy to deal with now that I know, and it's only going to happen if you are mixing the two, which I was doing for a very specific reason.
 
Well in that case, there is nothing a self-introduced preprocessor setting can't fix for ya. :) May I ask what the very specific reason is that you still rely on Monkey X?
 
I meant that I had a specific reason for using both Monkey and Cerberus simultaneously in such a way that I was trying to read from the 'monkey' data directory. Basically because I was creating data files in GLFW (for which I used Cerberus) to be read from HTML (for which I'm still using Monkey).

No real reason still to be using Monkey except that I have to chase up the new version of Mollusc - I have of course confirmed that my project works on Cerberus.
 
Back
Top Bottom