Copy link to clipboard
Copied
I am currently testing a highscore leaderboard, everything seems to work but I seem to be getting a error
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at prac2_fla::MainTimeline/pulse()[prac2_fla.MainTimeline::frame1:87]
Here is the .fla pastebin
The error is on line 87 as pointed,
I've been playing about but just cant figure it out, this is the last feature in my game.
1 Correct answer
Whatever you have in line 87 is trying to target something that does not exist. That is line 87 as you have it now with whatever traces you added.
Copy link to clipboard
Copied
Use the trace function to see what is coming up null in the line in question. It looks like your obj might not have a name value.
trace(nameTextBoxes[i].text);
trace(obj["name"]);
nameTextBoxes[i].text = obj["name"];
Copy link to clipboard
Copied
hi, I seem to get this error.
TypeError: Error #1010: A term is undefined and has no properties.
at prac2_fla::MainTimeline/pulse()[prac2_fla.MainTimeline::frame1:87]
from what Im understanding, after losing a game
this trace returned the list of 5 top player names
trace(obj["name"]); |
However this trace below did nothing, its almost non existent
trace(nameTextBoxes.text); |
Here is the .fla file incase you want to take a look
https://www.dropbox.com/sh/jem0683qdx85jsw/AAAYrMGdYNleD0enztdhXl3Qa?dl=0
Copy link to clipboard
Copied
I should have made that other trace be...
trace(nameTextBoxes);
just to make sure the textfields exist. If they are empty they will trace that emptiness.
Copy link to clipboard
Copied
it only returned:
[object TextField]
[object TextField]
[object TextField]
[object TextField]
[object TextField]
TypeError: Error #1010: A term is undefined and has no properties.
at prac2_fla::MainTimeline/pulse()[prac2_fla.MainTimeline::frame1:87
no sign of any names this time, unlike when I had trace(nameTextBoxes.text);
I'm really not sure where to go from here, because I cant figure out what it's trying to do.
Copy link to clipboard
Copied
Whatever you have in line 87 is trying to target something that does not exist. That is line 87 as you have it now with whatever traces you added.

