Announcement

Collapse
No announcement yet.

Unreal.js

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    I have a function and i need put to input arrays of bools what syntax is using?

    math_JS(arr/*array*/) /*NetMulticast*/ {
    console.log(arr[0], arr[1], arr[2])

    not working

    Comment


      #92
      syntax is like below; (referring to https://github.com/ncsoft/Unreal.js/...loBlueprint.js)

      this.Hello/*Replicated+EditAnywhere+int*/;
      this.Position/*EditAnywhere+Vector[]*/;

      So, you can write

      math_JS(arr/*Bool[]*/) {
      }

      Comment


        #93
        No /*Bool[]*/ is not working.. if i put Int=0 is all fine (print 0), but when i put Array from Blueprint is print Undefined.

        note: in blueprint i creating node MakeArray and put Boolean=false to first Pin. MakeArray output connect to input of math_JS..

        What to do?
        Last edited by florentine3d; 03-14-2016, 09:25 AM.

        Comment


          #94
          Have you tried with other types like float, string, ...? Unfortunately, I cannot test with PC for right now. (I'm out of the office this week)

          Comment


            #95
            Int and bool as input types work correctly other not tested (array not working). And one thing:

            I creating math_JS and override them, in JS return true, but Blueprint function always return false.

            Abstract examle:

            math_JS() {
            return true
            }


            Blueprint function return always false, if i try return int return always = 0. May be i do something wrong?

            What your source code responds for this?
            Last edited by florentine3d; 03-14-2016, 10:59 AM.

            Comment


              #96
              If your return param doesn't work, please try with `return {$:true}`.

              Comment


                #97
                `return {$:true}` - not working.. function always return false

                If i manually return for example True and delete function inside JS code.. all work fine, but when function is override by JS return not working.
                Last edited by florentine3d; 03-14-2016, 11:35 AM.

                Comment


                  #98
                  For a workaround, you can define a member variable in your BP which hold return value. In js function, js function writes return param value into that property.

                  Comment


                    #99
                    That's exactly what I did

                    Comment


                      Will correct errors?

                      Comment


                        Yes. But it would take some time.

                        Comment


                          nako_sung may you say what part of your program responds for return function error how you are making correction, what files and logic?

                          Comment


                            [MENTION=104645]florentine3d[/MENTION] Suspicious line is https://github.com/ncsoft/Unreal.js/...ivate.cpp#L485 I think I have omitted copying value.

                            Last edited by nako_sung; 03-14-2016, 02:10 PM.

                            Comment


                              For me very interesting how programming this things like this plugin. For me is very hard.. If not difficult you may making screen cast how you working with correct this error. Open IDE, project, change text, debug, and put to github? How you view how some changes of cpp code reflect one other parts of program, how to you view this... For me interesting view whole cycle of develop.

                              It maybe making without any sound and voice..

                              Comment


                                [MENTION=104645]florentine3d[/MENTION] Sorry, currently I have no plan to make a video about live-debugging.

                                Comment

                                Working...
                                X