#In which matgabriel actually was wrong and everything everyone else said to do was correct after all

1 messages · Page 1 of 1 (latest)

zinc perch
#

Now provide the source of the function throwing the error. What calls it.

tawdry sundial
#

oh cool

nova crater
#

I assume that you are calling it to wrong component, like component on a prefab

zinc perch
#

RequestCountDownSimple is being called on a ClockManager before its Awake method

nova crater
#

To see that we need to know how are you calling RequestCountDownSimple

tawdry sundial
#

Here#s the pastebin

#

enclosed class this time

zinc perch
#

Whether or not a different ClockManager has had awake called is not relevant

tawdry sundial
#

so what's the verdict here

nova crater
#

Or the result is same

zinc perch
#

In Awake, after setting minutes:

Debug.Log($"{gameObject.name}'s Awake method has set the length of minutes to {minutes.Length}",this);

In TMPUpdate, as the first line of the function:

Debug.Log($"{gameObject.name}'s TMPUpdate method wants to use a Minutes array of length {minutes.Length}",this);

Put those in there, make sure to keep the ,this. Show me a screenshot of your console with the error and these logs visible, but don't stop playing or clear the console.

tawdry sundial
#

With all due respect that's a waste of time Debug.Log(array.Length) confirms that the array exists and has length X

#

the code works as intended in the encapsulated isolated class

zinc perch
#

Do as I say if you want your problem solved

#

Or just fuck all the way off and leave the server

tawdry sundial
#

however when called from another class the arrays go null, I have no way of cleanly showing the code of the class that calls it, it's too complex and convoluted

#

but it's a point of attack at least

zinc perch
#

I am not going to humor you. Post what I asked or leave the thread. I will not continue otherwise.

tawdry sundial
#

you aren't able to solve my problem 🤌

#

no offense

zinc perch
#

The waste of time is you

nova crater
subtle bobcat
tawdry sundial
zinc perch
tawdry sundial
#

The time of the call being relevant I can understand, I can check that with a debug.log

#

but from where it's called should not be of any relevance

subtle bobcat
#

If you want help, follow directions instead of arguing, otherwise you're just wasting your time and ours

tawdry sundial
#

I can also check the value passed with a debug.log

#

so I'm baffled

zinc perch
#

Every assumption you have made has been wrong. I cannot trust any of the information you provide. So put in the logs and show me, because I can believe Unity

nova crater
tawdry sundial
zinc perch
#

We could have had this solved half an hour ago if you just did what I asked

tawdry sundial
#

I can tell you that the time of the call is clear, the value passed is clear, and the method is only called once

zinc perch
tawdry sundial
subtle bobcat
#

Digi literally told you what to show holy shit

zinc perch
tawdry sundial
#

I am doing it now

#

I appreciate you taking the time even though you wish me to hell already lol

zinc perch
#

You've lost the rights to courtesy. Show me the logs I asked for. Follow all the instructions. Keep the game running and don't clear the console

subtle bobcat
#

I admire your tenacity digi I'm just here to 🍿

tawdry sundial
zinc perch
#

I will have a work meeting within the next 20 minutes or so, so let's try to solve this quick

zinc perch
nova crater
#

Oh look! You're referencing prefab 😄

zinc perch
#

You're checking the value on a prefab

#

An object that cannot have Awake called on it

zinc perch
#

And if you had told us where the fucking function was called we would have seen that

#

so it was relevant

tawdry sundial
#

okay so blabla I'm a retard, yes I know

zinc perch
#

and you were wrong

#

and you are a jackass

tawdry sundial
#

the issue is I am referencing a prefab ?

zinc perch
#

and we do know more than you

tawdry sundial
#

I never claimed otherwise

nova crater
tawdry sundial
#

but that is true!

#

that claim is true

#

got you there didn't I !

nova crater
#

It's not. The call sight has the reference towards prefab

zinc perch
tawdry sundial
#

Well that's splitting hairs

zinc perch
#

It is, in fact, your exact problem

tawdry sundial
#

the issue was the reference pointed at a prefab

zinc perch
tawdry sundial
#

GameObject g = Resources.Load("EndlessCanvasUIModule") as GameObject;
GameObject gg = Instantiate(g, transform.position, transform.rotation);
gg.transform.parent = transform;
gg.transform.localPosition = Vector3.zero;

    clock = gg.GetComponent<ClockManager>();
#

this is how I created my clock manager

zinc perch
#

You are calling RequestCountDownSimple on a prefab. If you had answered the fucking question when it was asked, we would have seen that

tawdry sundial
#

but I had g.GetComponent<ClockManager>(); in the last line instead of gg.

nova crater
#

So the class you are doing that is problem like we said

tawdry sundial
snow breach
# tawdry sundial okay so blabla I'm a retard, yes I know

The problem is not that you are a retard, it's that you are just extremely obnoxious and unhelpful when receiving help from people who spend their spare time assisting people in this way. Can you really not see how this is the case?

snow breach
tawdry sundial
snow breach
#

Why refuse to investigate further into the code?

zinc perch
snow breach
#

You just can't see how it's obnoxious

tawdry sundial
#

I think I know better 'too'. Just like you guys

zinc perch
tawdry sundial
#

that doesn't make me bad, makes me just the same as you guys.

#

Reflect on that maybe.

#

I'm not throwing insults around

zinc perch
#

In which matgabriel actually was wrong and everything everyone else said to do was correct after all

snow breach
#

There are programmers here with TONS of experience debugging issues like this. All they want is to get to the root of the problem, but you fight it every step of the way. It's like calling a mechanic, but then when he tells you to open the hood, you lock it shut for like 30 minutes and refuse to let him look inside.

#

It's just a waste of everybody's time.

tawdry sundial
#

well I guess it's true that his debug line found the issue

snow breach
#

Including your own

tawdry sundial
#

when I thought it wouldn't

#

so yeah I fully admit I had that wrong

zinc perch
#

You should listen when people who are better at this give you advice

tawdry sundial
#

yeah, you've proven that

#

I didn't know that before hand though!

#

I was operating under the same assumption that I know better that you were

nova crater
tawdry sundial
#

only in hindsight can I know you actually did know better

snow breach
zinc perch
#

You can generally assume anyone willing to help you with any problem probably knows more about it, or they wouldn't have offered help

snow breach
#

Why call for a mechanic to diagnose your car if you will just assume you know more than the mechanic?

tawdry sundial
#

well thank you

tawdry sundial
#

I know you think I'm an obnoxious asshole and retard yada yada but I appreciate you taking the time lol

zinc perch
#

I will solve other people's problems even if I have to drag them kicking and screaming to them

snow breach
#

Jesus, that's a lot of messages...