Announcement

Collapse
No announcement yet.

Accessed None error - adding something on the server and calling back to update the UI

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

    Accessed None error - adding something on the server and calling back to update the UI

    Hi!

    Let me start off with the error I get:

    Error Blueprint Runtime Error:
    Accessed None trying to read property CallFunc_Array_Get_Item
    from function: 'FillSetsPannel'
    from node: SetText (Text Box)
    in graph: FillSetsPannel
    in object: Collection
    with description: Accessed None trying to read property CallFunc_Array_Get_Item

    What should happen: (@dedicated server + 2 players PIE)
    On the UI I cast to the player controller to call an event named "create new set". It creates a new object of type Set and adds it to an array of Sets. The event is set to "run on server" The array is on rep notify.
    In the rep notify function of Sets[] I call the event dispatcher "sets did change".
    On the UI the dispatcher is bound (at first time creation) to an event wich calls a function "refresh sets pannel".
    The function fires - but when I want to loop over the Sets[] and access its member variable "name" - a string with some default value - I get the above error after the PIE ends. Eventhough theres a default value getting the string out of the set does not return the string....

    Ive set everything to replicate on the Set and the Sets[] on the player controller aswell with the said notify...
    There are sets in the array but the members of the set wont be initialized on the client it seems....

    Can you help me?

    Edit: btw the server knows the correct value of the name property of the set. and i already tried to put a delay before updating the sets in case of some replication delay, but it still didnt work
    Last edited by t0b4cc0; 12-02-2016, 03:27 PM.

    #2
    the SET was derived from Object, it only held the data for those 3 variables

    **I made a new SET wich I made of type struct. it works perfect now.**

    Btw I found the Solution while trying around with the old set class and reparenting it to actor and actor component...
    I then couldnt reparent it to object anymore (even tho I did nothing and used nothing that requires it to be a component)

    It was impossible to trick my way aorund this and i had to swap every reference to my old set with the new one.... im happy i tried it with a struct first.....

    DONT USE "OBJECT" for Data only stuff - use STRUCTS...

    Comment

    Working...
    X