Skip to main content
Participant
April 21, 2016
Answered

Semicolon?

  • April 21, 2016
  • 1 reply
  • 274 views

Got an error saying there needs to be a semicolon before "boy" ?

var snd:innocent boy = new innocent boy();

This topic has been closed for replies.
Correct answer robdillon

innocentboy needs to be a single word. It is the name of the class, the instance name that you are giving to the new instance should be different from the name of the class:

var snd:myInnocentBoy = new innocentboy();

1 reply

robdillon
robdillonCorrect answer
Participating Frequently
April 21, 2016

innocentboy needs to be a single word. It is the name of the class, the instance name that you are giving to the new instance should be different from the name of the class:

var snd:myInnocentBoy = new innocentboy();