Announcement

Collapse
No announcement yet.

why does this faill only on dedicated server?

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

    why does this faill only on dedicated server?

    Click image for larger version

Name:	teststack.jpg
Views:	1
Size:	481.9 KB
ID:	1197303
    On the editor, this script works fine, even in dedicated server mode.
    On the game, played in single player mode or non-dedicated server, it works perfectly.
    I install it on my dedicated server, it sets max item quantity fine, but fails to set base item weight.
    I took the max quantity out in case that was casuing the problem. it still fails to set base item weight.
    I replace the equation with a physical number, "1".
    It still fails, but only on a standalone dedicated server. Everywhere else, it succeeds. Why?

    Thank you.

    #2
    Try adding a short delay after the begin play. Default 0.2 should be fine.


    My Mods | P0k3r's Workshop

    Comment


      #3
      Originally posted by P0k3r View Post
      Try adding a short delay after the begin play. Default 0.2 should be fine.
      I see where you are going and i did give it a go but sadly it did not fix the problem. what i don't get is it sets max item quantity, no problem at all, but it has the problem with base item weight and only on the dedicated server. the server is up to date. It makes no sense. I wonder if it's a bug on the server.

      Comment


        #4
        Just going out on a limb here, given the situation, but have you tried firing a custom event to run only on the server? You know,

        Event Begin Play -> Custom Event

        Custom Event (Server Only) -> Rewrite values
        I will finish this mod.

        Alchemy (A Full Blown Skill)

        Comment


          #5
          Originally posted by Huston850 View Post
          Just going out on a limb here, given the situation, but have you tried firing a custom event to run only on the server? You know,

          Event Begin Play -> Custom Event

          Custom Event (Server Only) -> Rewrite values
          If that was the problem, it would not update either value, surely. also the problem would be on any server. It's wierd. I did try the hasauthority call on it but that made no difference

          Comment


            #6
            Originally posted by fjb View Post
            If that was the problem, it would not update either value, surely. also the problem would be on any server. It's wierd. I did try the hasauthority call on it but that made no difference
            Not true. Neither of those variables are replicated. Weight may only exist on the server and quantity on client. or vice versa. I honestly don't know the specifics but in the time it took you to post that, you could have created a run on server event and tested it before just assuming it won't work.
            You probably know the saying for Assume so I won't go into that but I will say that nowhere else in life is it as true as it is with this devkit. Never assume anything with ADK.
            Last edited by P0k3r; 10-22-2016, 07:47 PM.


            My Mods | P0k3r's Workshop

            Comment


              #7
              Originally posted by P0k3r View Post
              Not true. Neither of those variables are replicated. Weight may only exist on the server and quantity on client. or vice versa. I honestly don't know the specifics but in the time it took you to post that, you could have created a run on server event and tested it before just assuming it won't work.
              You probably know the saying for Assume so I won't go into that but I will say that nowhere else in life is it as true as it is with this devkit. Never assume anything with ADK.
              the properties are of the same object and the hasauthority which i did try enured it only ran on the server. besides, my editor takes ages to load. I'm unfamiliar with custom events anyway.If i was i'd give it a go.

              Comment


                #8
                Originally posted by fjb View Post
                the properties are of the same object and the hasauthority which i did try enured it only ran on the server. besides, my editor takes ages to load. I'm unfamiliar with custom events anyway.If i was i'd give it a go.
                Takes forever for everybody. Is it worth fixing your mod?

                Right click -> Custom Event -> Name it something nice -> Left click the big red box that is your custom event -> On the bottom left corner you'll see some default variables for this event -> Set Replication to Run on Server -> Check off "Reliable" -> Paste your logic into this event -> Call your event from Begin Play
                I will finish this mod.

                Alchemy (A Full Blown Skill)

                Comment


                  #9
                  Originally posted by Huston850 View Post
                  Takes forever for everybody. Is it worth fixing your mod?

                  Right click -> Custom Event -> Name it something nice -> Left click the big red box that is your custom event -> On the bottom left corner you'll see some default variables for this event -> Set Replication to Run on Server -> Check off "Reliable" -> Paste your logic into this event -> Call your event from Begin Play
                  Ok. Check off reliable? What does "reliable" do? Is it some form of optimisation?

                  Comment


                    #10
                    https://docs.unrealengine.com/latest...iers/Reliable/

                    Comment


                      #11
                      Ta. well i tried it. stuck it in a custom even as instructed set it to run on the server, changed stack size size but didn't alter weight. swiched event from server to multicast, it changed stack size but not weight. i't got me beat. i know someone managed it using switchnetauthority. I was wondering if the problems is tha it needs to be set on teh client rather than the server but multicasting shattered that is it apparently runs the event on both.

                      Comment


                        #12
                        There are a few methods you could try. You have two variables: weight, and quantity. I'll tell you that I had a situation where the file being used wasn't properly replicating the event to the client, so I had to use a custom event. This gives you four routes:

                        1) Begin play only
                        2) Server only
                        3) Client only
                        4) Multicast

                        Trying is learning. See what you can make of this.
                        I will finish this mod.

                        Alchemy (A Full Blown Skill)

                        Comment


                          #13
                          Originally posted by Huston850 View Post
                          There are a few methods you could try. You have two variables: weight, and quantity. I'll tell you that I had a situation where the file being used wasn't properly replicating the event to the client, so I had to use a custom event. This gives you four routes:

                          1) Begin play only
                          2) Server only
                          3) Client only
                          4) Multicast

                          Trying is learning. See what you can make of this.
                          Agreed. i did try server and multicast. the probem does seem to be writing weight. I think even it i took the changing stack size out altogether it would still fail. I'll give the other two a go. nothing ventured.

                          Comment


                            #14
                            I put some debug information on the server run where it read back the wight it had just written and it come up with this
                            2016.10.24-08.26.25:839][ 2]2016.10.24_08.26.25: new weight is0.011111
                            which is correct. therefore it looks like a replication problem. I'm going to try running it as a clinet process and see what happens.

                            Comment


                              #15
                              doesn't work when run in client mode either. That is wierd.

                              Comment

                              Working...
                              X