Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error #2007: Parameter text must be non-null.

Explorer ,
Apr 01, 2015 Apr 01, 2015

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,

http://pastebin.com/rs64PckT

I've been playing about but just cant figure it out, this is the last feature in my game.

TOPICS
ActionScript
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 01, 2015 Apr 01, 2015

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.

Translate
LEGEND ,
Apr 01, 2015 Apr 01, 2015

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"];

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2015 Apr 01, 2015

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 01, 2015 Apr 01, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2015 Apr 01, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 01, 2015 Apr 01, 2015
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines