1 Reply Latest reply on May 1, 2007 6:53 AM by Newsgroup_User

    when request both getgroupattribute and DBUser attribute, the data conflict occur

    Aeons Level 1
      Hi guys,
      I had encounter this weird problem. Assuming a user had log in, set the group attribute, and all of this are working perfectly, just only when i request for both get group attribute and get DBUser attritbute then the prob occur.
      The problem which i got is, when i request the get DBUser attritbute, then the information was pass to receivegrpattribute handler instead of createnewplayer handler. Why is this happen?

      When i repeat use get DBUser attritbute for 5 times, the information is still return correctly to its respective handler, bt if i insert another getgroupattribute command then it just simply overwrite my getgroupattribute result by getDBUserattribute command...

      Here is my code:

      global gmultiuserserver

      on receivenewcomer (me, message)--send by server script, whenever a new user join the same group
      --message.content=user.name--send by server
      gmultiuserserver.sendNetMessage("system.DBUser.getAttribute", "createnewplayer", [#userID: message.content, #attribute: [#friendslist,#money]])
      gmultiuserserver.sendNetMessage("system.group.getAttribute", "receivegrpattribute", [#group: "@room1", #attribute: [#peoplelist]])
      end

      on createnewplayer (me, message)
      put message.content
      end

      on receivegrpattribute(me, message)--new furniture
      --the new set of furniture was original in the room which is a set a group attribute variable, so we need to recreate the room item for any new comer.
      --this information are return as a propertylist within a linear list such as [[#itemA:[#color:"red", #material:#wood]]]
      put message.content
      end


      Kindly enlighten me,
      Cheers
        • 1. Re: when request both getgroupattribute and DBUser attribute, the data conflict occur
          Level 7
          Too lengthy message to read thoroughly.
          From this line though:
          > When i repeat use get DBUser attritbute for 5 times...
          I 'd suggest you check if you have previous messages in the queue.
          Assume you have some messages queued, and you send a new message waiting for
          a replay.
          When you try to retrieve the reply, what you'll actually get will be the
          first message waiting in the queue.


          "Aeons" <webforumsuser@macromedia.com> wrote in message
          news:f075cd$4ga$1@forums.macromedia.com...
          > Hi guys,
          > I had encounter this weird problem. Assuming a user had log in, set the
          > group
          > attribute, and all of this are working perfectly, just only when i request
          > for
          > both get group attribute and get DBUser attritbute then the prob occur.
          > The problem which i got is, when i request the get DBUser attritbute, then
          > the
          > information was pass to receivegrpattribute handler instead of
          > createnewplayer
          > handler. Why is this happen?
          >
          > When i repeat use get DBUser attritbute for 5 times, the information is
          > still
          > return correctly to its respective handler, bt if i insert another
          > getgroupattribute command then it just simply overwrite my
          > getgroupattribute
          > result by getDBUserattribute command...
          >
          > Here is my code:
          >
          > global gmultiuserserver
          >
          > on receivenewcomer (me, message)--send by server script, whenever a new
          > user
          > join the same group
          > --message.content=user.name--send by server
          > gmultiuserserver.sendNetMessage("system.DBUser.getAttribute",
          > "createnewplayer", [#userID: message.content, #attribute:
          > [#friendslist,#money]])
          > gmultiuserserver.sendNetMessage("system.group.getAttribute",
          > "receivegrpattribute", [#group: "@room1", #attribute: [#peoplelist]])
          > end
          >
          > on createnewplayer (me, message)
          > put message.content
          > end
          >
          > on receivegrpattribute(me, message)--new furniture
          > --the new set of furniture was original in the room which is a set a group
          > attribute variable, so we need to recreate the room item for any new
          > comer.
          > --this information are return as a propertylist within a linear list such
          > as
          > [[#itemA:[#color:"red", #material:#wood]]]
          > put message.content
          > end
          >
          >
          > Kindly enlighten me,
          > Cheers
          >