loboWu

Members
  • Content count

    80
  • Joined

  • Last visited

Community Reputation

214 Neutral

About loboWu

  • Rank
    Member

Personal Information

  • Interests
    Art
  1. stringConstants larger than 65536

    Dear Andreas: Thanks for your reply. I realize that loading string at run-time could do the task. But my team members prefer the straightforward way. I glanced round your codes, the key point is asBC_STR. I will try to do a little changes.   Thanks for your angelscript , we have 20~30 members writing the script codes.
  2. Dear Andreas:   I need a very large string table to generate some times. usually I write some code like that: void do_job(string[]@ ar) { ...................... } void main() { string[] samples = { #include "strings.txt" } do_job(samples); } strings.txt is a very large file like (usually 100000 lines) ".Database/001/IDX/00.idx", ".Database/001/IDX/01.idx", ".Database/002/IDX/02.idx", .......       But I saw the following codes in as_scriptengine.cpp int asCScriptEngine::AddConstantString(const char *str, size_t len) { // The VM currently doesn't handle string ids larger than 65535 asASSERT(stringConstants.GetLength() <= 65536); } How should I do to exceed 65536 string constants ?
  3. In the past years, I use 2.29.0 for a long time. But when I upgrade to 2.31.0, I found something strange with scriptany class try the following codes(which are correct in 2.29.0)   void main() {     string testh = "hello";     string output;     any data;     data.store(testh);     any temp = data;                 temp.retrieve(output);      // the retrieve will return false }   but the following codes   void main2() {     string testh = "hello";     string output;     any data;     data.store(testh);     any temp;     temp = data;                 temp.retrieve(output);      // the output will get the right value "hello" }  
  4. string array error

    Dear andreas:     I decare a string array   ex:         string[]   arr = { "11111" , "222222"};      But If I remove the comma                  string[]   arr = { "11111"   "222222"};       angelscript won't report parsing error.     Instead, this statement is equal to string[] arr={"11111222222"};        Is it a bug?
  5. uint token parse error!

    I just update to latest revision. But it crash at array bytecode saving. try this   void main() {      const uint8[] arr = {1,2,3,4,5}; } It compiles with no error, but it crash when saving bytecode,
  6. uint token parse error!

    Thanks a lot.   But in revision 1837 , it will crash in "as_restore.cpp" line 4579 "SInfo info = stack.PopLast();" if stack in empty, the info maybe null.   Currently, I use revision 1833
  7. uint token parse error!

    Dear Andreas:    please try this in 2.28.1    void main()    {         uint8  uint8Temp;         uint32 uint32B;    }      The variable name starting with (uint8, int8...) will result in parsing error.
  8. array with object reference

    Thanks a lot.
  9. array with object reference

    Dear Andreas:    I could reproduce the bug.    But it occurs only when loading bytecode and run.          I think there are 2 bug    1.  string[] ar = {"a", "b", "c", "d", "e", "f", "g"}   has memory leak,        in my env, the memory leak maybe   "e" , "f", "g" .....      2. when calling SetCurrentModel(ar[2]), it will raise an exception        at string opAssign() with an illegal parameter.       Thanks a lot.
  10. array with object reference

    [source][/source]Dear Andreas: I found there's something strange about array constructor in 2.18.1.   I had a string class which is registered with reference. The codes are similar with http://www.gamedev.net/topic/639252-asobj-ref-and-asobj-value-at-the-same-time/   and here is my testing code without fail  [source]import void SetCurrentModel(string) from "model2"; void test(uint idx) { string@[] models={"111", "222", "333", "444", "555", "666", "666"}; if (idx <=6) SetCurrentModel(models[idx]); else SetCurrentModel(""); }[/source]   If I change the string array codes like this  [source]import void SetCurrentModel(string) from "model2"; void test(uint idx) { string[] models={"111", "222", "333", "444", "555", "666", "666"};   //replace "string@ " with "string" if (idx <=6) SetCurrentModel(models[idx]); else SetCurrentModel(""); }[/source] There are some string memory leak in 2.18.1. (but that's fine in 2.17.0) I couldn't point out the bug exactly, but I think there are 2 bugs with object reference array 1.  value assignment operators on reference types 2.  CScriptArray::Construct()
  11. Compiling and running on armv7

    Dear Andreas:      Actually, your excellent angelscript work saved us a lot.    We could compile once, execute bytecodes in ARM and PC  simultaneously.
  12. Compiling and running on armv7

     use these flag "-mfloat-abi=hard -mfpu=vfpv3-d16 -marm"  angelscript arm calling convention is only suitable for vpfv3-d16.
  13. Marmalade: Angelscript runs fine on x86, crashes on ARM

    The arm gcc compiler is just come with marmalade SDK. It use arm-none-eabi with GCC 4.4.1
  14. Marmalade: Angelscript runs fine on x86, crashes on ARM

    Here is the attached file