Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 28 Dec 2011 04:33 PM |
I don't understand.
22:26:30 - Players.Player.Backpack.Test.Script:24: attempt to index field 'Target' (a nil value) 22:26:30 - Script "Players.Player.Backpack.Test.Script", Line 24 - global onButton1Down 22:26:30 - Script "Players.Player.Backpack.Test.Script", Line 48
How come Target is wrong when I typed mouse.Target? |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 28 Dec 2011 04:46 PM |
The mouse probably didn't click anything. Put in a safety thing like this
if (mouse.Hit.p-script.Parent.Torso).magnitude<1000
|
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 28 Dec 2011 04:54 PM |
| What does second output mean? |
|
|
| Report Abuse |
|
|
Zarcius
|
  |
| Joined: 08 Dec 2007 |
| Total Posts: 3024 |
|
|
| 28 Dec 2011 04:56 PM |
"22:26:30 - Script "Players.Player.Backpack.Test.Script", Line 24 - global onButton1Down 22:26:30 - Script "Players.Player.Backpack.Test.Script", Line 48"
This is showing you the lines that are errored.. from 24-48, something has gone wrong.
At least, that's what I've always interpreted it as, maybe I'm wrong. |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 28 Dec 2011 04:57 PM |
| No offense, but yes you're wrong |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 28 Dec 2011 04:58 PM |
| Second output would be the end of the script or function. I think. |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 28 Dec 2011 04:59 PM |
| Take it back I didn't read correctly. I'm off tonight. It's the line where you called the function that the error is in. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 29 Dec 2011 10:59 AM |
| Ok thanks guys. By the way, I omly just wanted to know what global means. And you showed me. Thanks! |
|
|
| Report Abuse |
|
|