Waz_Up
|
  |
| Joined: 07 Jan 2012 |
| Total Posts: 113 |
|
|
| 13 Sep 2016 02:37 PM |
so in my script i have this code
~~~~~~~~~~~~~~~~~ local data = player:WaitForChild("DATA") ~~~~~~~~~~~~~~~~~ but each time i test it i get an error from it is there a way i can fix it?
|
|
|
| Report Abuse |
|
|
ManxFox
|
  |
| Joined: 12 Nov 2008 |
| Total Posts: 227 |
|
|
| 13 Sep 2016 03:54 PM |
it's waiting for an object called "DATA". if there is no object called DATA in player then it will become an infinite yield meaning the script cannot progress any further
|
|
|
| Report Abuse |
|
|
KreoBox
|
  |
| Joined: 24 Aug 2016 |
| Total Posts: 356 |
|
| |
|
ManxFox
|
  |
| Joined: 12 Nov 2008 |
| Total Posts: 227 |
|
|
| 13 Sep 2016 04:00 PM |
if it wasn't an error it wouldn't be popping up would it?
send the whole script so I can see exactly what it's doing
|
|
|
| Report Abuse |
|
|
KreoBox
|
  |
| Joined: 24 Aug 2016 |
| Total Posts: 356 |
|
|
| 13 Sep 2016 04:03 PM |
HE NEVER SAID ANYTHING ABOUT A POPUP.
It. Is. A. Warning.
Try looking at it. |
|
|
| Report Abuse |
|
|
ManxFox
|
  |
| Joined: 12 Nov 2008 |
| Total Posts: 227 |
|
|
| 13 Sep 2016 04:05 PM |
| ###### was a metaphor, you pleb. and yes, it is a warning. BUT that warning stops the script from doing anything else until it's dealt with, therefore # class that SPECIFIC warning ## an error. |
|
|
| Report Abuse |
|
|
KreoBox
|
  |
| Joined: 24 Aug 2016 |
| Total Posts: 356 |
|
|
| 13 Sep 2016 04:10 PM |
No. IT IS NOT AN ERROR.
There was an update a little while ago. It made this warning happen if the object WaitForChild is waiting for does not exist already.
IT DID NOT CHANGE HOW ANYTHING WORKED. THE SCRIPT WORKS FINE. |
|
|
| Report Abuse |
|
|
ManxFox
|
  |
| Joined: 12 Nov 2008 |
| Total Posts: 227 |
|
|
| 13 Sep 2016 04:12 PM |
Mate, you need some water to wash down all that salt. I don't know why you're so salty right now but it's giving this thread a bad atmosphere, no one wants to deal with your crappy attitude. So peace.
for the record, he asked what would stop it from happening. I answered his question so I'm done here.
|
|
|
| Report Abuse |
|
|
KreoBox
|
  |
| Joined: 24 Aug 2016 |
| Total Posts: 356 |
|
|
| 13 Sep 2016 04:16 PM |
I am very sick and tired of explaining that it is a warning, it doesn't mean the script is broken, just because you see a stack trace in the output doesn't mean it is an error.
Sometimes things need to be created at runtime. |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2016 05:08 PM |
WaitForChild NEVER returns an error, only thing it will do is give a warning to the output after an X amount of seconds that it is possible to infinitely yield.
In the case the object never loads then the script will hang. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 13 Sep 2016 05:14 PM |
Is this for data persistence? If yes, use Datastores. Otherwise if its a gui, make sure the data exists and use a localscript
|
|
|
| Report Abuse |
|
|