zagabar's Recent Forum Activity

  • Yes, it worked! : D

    Semi-worked at least.

    The serialization in serialize.cpp worked fine with that you posted. However, in runtime when it is supposed to load the serialization, it fails even if I just copy paste the loading part from the serialize.cpp file.

    This is not needed by me though since the game we are writing never loads in runtime so it works for me. However if I am supposed to post the plugin onthe forum, it would be nice to fix this. Any ideas on how to?

  • Hello.

    I am working on a C++-plugin that is a string container. It needs to store any amount of strings that the user inputs. Hence I thought that using a vector<CString> would be a good idea. Unfortunately, visual studio disagreed.

    The serialization that is needed don't seem to work on vectors nor arrays. :/ What should I do?

  • All right.

    Thanks for the workarounds on how to fix it, but since there was no really nice way for this I think I'll write a c++ plugin for this. A simple container object that is setable and getable from python.

    I'll upload it later.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello.

    In my game, I am working with a bunch of strings that I need to retrieve in python script. However, that was much harder than I first though. First I tried with hash tables and I made it store the strings correctly. But the hash table don't seem to have a function for retrieving values in python script and after some experimentation I gave up.

    I then saved the strings to an array(construct array, not python array) instead. Sadly, I encountered the same problems. Apparently, the common ArrayName[index] didn't work with constructs arrays. They too had no visible functions that could solve it, so I gave up on this too.

    My third attempt was to use a python array entirely. I did it like this:

    http://codepad.org/HPAf47o4

    The "x"'s are just default values. To insert values in the array, I first set the global variables, then I run the script. This didn't work either. After the script was run, the array was still filled with "x"'s.

    I never thought that this simple thing would be so darn complicated, lol. I am considering to write a C++-plugin that acts as a container for strings that you can actually fetch inside of python, but is this really necessary?

    Any ideas? Am I missing something really obvious?

zagabar's avatar

zagabar

Member since 7 May, 2010

None one is following zagabar yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies