What is this AS3 syntax? new <object>[]; - actionscript-3

I'm trying to use the SoundAS library in an old Flex 3.6 project. However, upon trying to use it, I get several syntax errors.
Description Resource Path Location Type
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 362 Flex Problem
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 377 Flex Problem
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 440 Flex Problem
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 443 Flex Problem
1084: Syntax error: expecting identifier before return. SoundManager.as /treefortress/sound line 438 Flex Problem
1084: Syntax error: expecting identifier before rightbrace. SoundManager.as /treefortress/sound line 371 Flex Problem
1084: Syntax error: expecting identifier before rightbrace. SoundManager.as /treefortress/sound line 372 Flex Problem
1084: Syntax error: expecting identifier before rightbrace. SoundManager.as /treefortress/sound line 430 Flex Problem
1084: Syntax error: expecting identifier before var. SoundManager.as /treefortress/sound line 389 Flex Problem
1084: Syntax error: expecting identifier before var. SoundManager.as /treefortress/sound line 407 Flex Problem
1084: Syntax error: expecting identifier before var. SoundManager.as /treefortress/sound line 426 Flex Problem
1084: Syntax error: expecting identifier before var. SoundManager.as /treefortress/sound line 433 Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447 Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447 Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447 Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447 Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447 Flex Problem
1084: Syntax error: expecting rightbrace before for. SoundManager.as /treefortress/sound line 408 Flex Problem
1084: Syntax error: expecting rightbrace before if. SoundManager.as /treefortress/sound line 390 Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace. SoundManager.as /treefortress/sound line 362 Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace. SoundManager.as /treefortress/sound line 377 Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace. SoundManager.as /treefortress/sound line 440 Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace. SoundManager.as /treefortress/sound line 443 Flex Problem
1084: Syntax error: expecting rightbrace before loadCompleted. SoundManager.as /treefortress/sound line 427 Flex Problem
1084: Syntax error: expecting rightbrace before loadFailed. SoundManager.as /treefortress/sound line 434 Flex Problem
1084: Syntax error: expecting rightbrace before semicolon. SoundManager.as /treefortress/sound line 363 Flex Problem
1084: Syntax error: expecting rightbrace before semicolon. SoundManager.as /treefortress/sound line 383 Flex Problem
1084: Syntax error: expecting rightbrace before semicolon. SoundManager.as /treefortress/sound line 393 Flex Problem
1084: Syntax error: expecting rightbrace before semicolon. SoundManager.as /treefortress/sound line 418 Flex Problem
1084: Syntax error: expecting rightbrace before semicolon. SoundManager.as /treefortress/sound line 446 Flex Problem
1100: Syntax error: XML does not have matching begin and end tags. SoundManager.as /treefortress/sound line 447 Flex Problem
1100: Syntax error: XML does not have matching begin and end tags. SoundManager.as /treefortress/sound line 447 Flex Problem
1100: Syntax error: XML does not have matching begin and end tags. SoundManager.as /treefortress/sound line 447 Flex Problem
Looking in SoundManager.as, the reported syntax errors are not the actual problem. Instead, the errors all seems to be caused by the use of something like new <Object>[];... For instance, if(!groups){ groups = new <SoundManager>[]; } on line 350.
I'm not familiar with the syntax used... What is it trying to do, why is it not working in Flash Builder 4.7, and how can I get it to work?

Yes, #AndreyPopov is right. This variable groups is a Vector of type SoundManager. var groups:Vector.<SoundManager> The respective if statement if to groups instance is null and if so, create a new instance.

Related

Octave 5.2.0 GUI: strcat (and other commands) suddenly not found (functioned before)

I use Octave 5.2.0 in GUI.
After using Octave for 2 weeks I'm suddenly confronted with errors I didn't
have before with the same code.
Also today I suddenly received a message not finding the 'close' in this
code :
clear ; close all; clc;
error: 'strcat' undefined near line 44 column 25
error: called from
handleSto at line 44 column 24
testinvoer03 at line 69 column 1
>> EXEC_PATH
ans =
C:\Octave\OCTAVE~1.0\mingw64\bin;C:\Octave\OCTAVE~1.0\mingw64\notepad++;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\5.2.0\site\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\api-v53\site\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\site\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\5.2.0\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\bin
>> strcat("ddd" ,"fff")
error: 'strcat' undefined near line 1 column 1
I found the strcat file strcat.m in
C:\Octave\Octave-5.2.0\mingw64\share\octave\5.2.0\m\strings.
Obviously the not in the exec_path.
I also checked path which gave me a point only.
I have added addpath("C:\\Octave\\Octave-5.2.0\\mingw64\\share\\octave\\5.2.0\\m")
now the Octave command windows tells me:
error: 'close' undefined near line 63 column 1
error: called from
testinvoer03 at line 63 column 1
The code was:
% &nd=1986-01-02 ??
% &revision_date=2020-02-21&nd= ??
…
%
clear;
close all;
clc;
land={'world'}; %{'world','us','jp'};
%
…
line number 63 was correct.
Anybody had this problem. Some advise please.

GNU Octave error message

When I load Octave each time I get the below errors after the welcome/info message.
error: `prefix' undefined near line 12 column 35
error: evaluating argument list element number 2
error: called from:
error: C:\Octave\Octave3.4.3_gcc4.5.2\share\octave\site\m\startup/octaverc at line 12, column 1
octave:1>
Does anybody know why this is happening?
For that version of octave, the default settings of that file around that line are:
prefix=octave_config_info('prefix');
setenv('path',[getenv('path'),';',prefix,'\mingw32\bin;',prefix,'\msys\bin']);
setenv('path',[getenv('path'),';',prefix,'\gs\gs9.02\bin'])
So you should check if it has changed

Notice: Undefined variable: successMessage in

I am getting the following error message on my site.
"Notice: Undefined variable: successMessage in /home/sites/synapsetechnologies.com/public_html/Login.php on line 107 Notice: Undefined variable: error in /home/sites/synapsetechnologies.com/public_html/Login.php on line 107"
Code: https://jsbin.com/biwutacufe/edit?html,output
I took a look at my codes but cannot figure out what is wrong. I have tried the console in Chrome but it doesn't give me a lot of info.
Thanks

I am getting the following error while trying to use the library function fminunc in octave

error: 'cholupdate' undefined near line 209 column 14
error: called from
fminunc at line 209 column 12
ex2 at line 86 column 13
My C drive had run out of space so the installation probably didn't succeed properly.
Reinstalling Octave after clearing space has fixed the issue.
Thanks for your help.

1084: Syntax error: expecting rightbrace before end of program. - AS3

Whats the error in this thing -:
var decodeChars:Vector.<int> = new <int>[-1, -1, -1, -1, -1];
I get four complier errors three saying that "1084: Syntax error: expecting rightbrace before end of program." and the fourth saying that "1100: Syntax error: XML does not have matching begin and end tags.".
Whats the actual problem? thanks for help
Your code appears to be properly formed as demonstrated at http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Vector.html#Vector()
1: Turn on debugging mode before compiling (Publish Settings > Flash > Permit debugging). From the errors given, It doesn't sound like this line is the cause of the issue. Debugging mode will tell you which line is throwing errors.
2: As The_asMan already mentioned, 1084 is indicating that you have a shortage of close braces. Make sure you properly indent your code, and this issue should be apparant.
3: 1100 is indicating that an XML file you loaded is malformed. Run your XML through a syntax validator such as http://validator.w3.org/