Error : ' ; ' expected
Could someone please tell me what's wrong with the following:
public String convert24ToStd (int hh, int mm)
String PM;
String AM;
hour = (hh > 12 ? PM : AM);
StringBuffer append( hour );
}
Thanks for your reply. I'm sorry but I'm an absolute novice and I'm not even sure what am I doing. I'm just struggling to do this homework.
I haven't done much, but this is what I've got so far:
public class newTime extends Object
private int hour; // 0-23
private int minute; // 0-59
public boolean valid24Time(int hh, int mm)
if ((hh == 0 && hh<=23) && (mm == 0 && mm<=59))
return true;
else
return false;
public String convert24ToStd (int hh, int mm)
String PM;
String AM;
hour = (hh > 12 ? PM : AM);
StringBuffer append( hour );
}
Similar Messages
-
I am making an applescript for my modding tool for Minecraft. It used to use multiple apps and I am now trying to make one app for all the tasks.
Here is the code:
say "You are running iCraft version one point one for minecraft version 1.2.5"
display dialog "Which tool do you want to use?" buttons {"Mod Installer", "Backup", "Restore"} default button 3
set the button_pressed to the button returned of the result
if the button_pressed is "Mod Installer" then
do shell script "~/desktop/iCraft/iCraft.app/contents/re…
display dialog "Insert all mod files into the Mods folder."
display dialog "Have you inserted all Mod files into the Mods folder?" buttons {"Yes", "No"} default button 2
if the button_pressed is "Yes" then
do shell script "~/desktop/iCraft/iCraft.app/contents/re…
display dialog "Finished"
else
display dialog "Insert mod files into the Mods folder and restart iCraft.app."
end if
if the button_pressed is "Backup" then
display dialog "Are you sure you want to backup your Minecraft.jar in it's current state?" buttons {"Yes", "No"} default button 2
if the button_pressed is "Yes" then
do shell script "~/desktop/iCraft/iCraft.app/contents/re…
display dialog "Finished, find it in your Backups directory in the iCraft folder"
else
display dialog "Backup aborted"
end if
if the button_pressed is "Restore" then
display dialog "Are you sure you want to restore your Minecraft.jar with your backup?" buttons {"Yes", "No"} default button 2
if the button_pressed is "Yes" then
do shell script "~/desktop/iCraft/iCraft.app/resources/s…
else
display dialog "Restore aborted"
end if
end
When I try to compile/run it gives me Syntax Error: Expected end of line, etc. but found end of script.Your script got mangled when pasting it into your message, but the main problem looks like you are missing a bunch of end if statements. Unless your if statements are contained on one line, you need to terminate them with a matching end if statement - for example, the following are equivalent:
if someString is "whatever" then display dialog "foo"
if someString is "whatever" then
display dialog "foo"
end if -
AppleScript - Syntax Error: Expected end of line found """.
The following AppleScript code works on Tiger and Snow Leopard but not on Leopard (10.5 > 10.5.8).
tell application "FileMaker Pro"
tell database "SomeDB.fp5"
-- some code to execute
end tell
end tell
In Leopard, the code won't compile and is complaining of a Syntax Error: Expected end of line found """. I click OK and then the quote symbol ( " ) to the left of SomeDB.fp5 is highlighted.
Has anyone else experienced this and have resolved this in Leopard?
ThanksIf you copy/pasted the script from somewhere, the line endings in the source may not be translating. Try replacing the line endings (the return) on the lines around the one that is being highlighted.
-
Error "Expected end of color space" when opening converted OTF - PDF.
Hi experts,
I need help. I'm converting from otf to pdf and it works fine. However when i tried putting a bitmap 256 color to the smartform and generate pdf with CONVERT_OTF FM the pdf result in an error "Expected end of color space" when opening the document and it goes blank.
Can anyone tell why ?
Thanks,
FelixHi Peter,
I can open it with another acrobat version. However, the image is not displayed. Do you know why?
Thanks -
Version 4 Error: Expected Container, found Object Reference
We're in the process of upgrading our sequences from 3.5 to
4.0 and for the most part, everything is seamless. However, there is one situation I’ve found
that throws a RTE in 4.0 but works fine in 3.5.
When calling SetPropertyObject on an object reference, the following
error is thrown:
Parameter 'newValue': Expected Container, found Object Reference.
-17308; Specified value does not have the expected type.
Attached is a sequence snippet illustrating this
behavior. The last step should assign
the variable in Parameters with the name in TempStr (“Fred” in this example) to
the first element in the TraceObjRefs array (an array of object references).
What is really confounding is that this works as expected in
3.5. Any insight as to what changed or
what’s the best way to work around this?
Attachments:
AliasBreak35.seq 46 KBWe are seeing something similar in TS 4.1.
We have a container with subproperties which are also containers (of the same type actually). Technically, this is an array, we are using the container to be able to address by name. When I extract one of the sub-properties either by GetPropertyObject or by GetNthSubproperty and then try to assign it to a container of the same type, I get the error "Expected container, found object reference".
I attached a sequence with some experiments, using the NI_Limits type and found a solution: the Evaluate method seems to actually copy the values from the source container to the target; but only when it is not called as "PropertyObject.Evaluate()" but stand alone.
But I did not quite understand the mechanics of the aliases. In the sequence, I create an alias, as indicated in the previous posts. Then I can apparently not change that alias again. I used the "Data" member in the NI_Limits container to differentiate between the individual containers.
After the second SetPropertyObject, the value stays the same as before. But when I then change the value in one of the source objects, the other changes with it.
So I am not quite clear what an alias actually is and what its effects are.
Regards
Peter
Attachments:
TestObjRef.seq 6 KB -
Drag and drop to target simple errors, expecting identifier?
im creating a drag and drop. moving a guitarest name to a target e.g draging a movieclip called slash to a dynamic text box called box_slash this is my code and i get 2 stupid errors but have been up all night and cant figure it out!
flash cs5 actionscript 3, is this code for actionscript3 i found the base for it here: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial any help would be incredible as it for an assignment and im new to flash
var hits = 0;
// Register mouse event functions
slash.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
slash.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
clapton.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
clapton.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
hendrix.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
hendix.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
// Define a mouse down handler (user is dragging)
function mouseDownHandler(evt:MouseEvent):void {
var object = evt.target;
// we should limit dragging to the area inside the canvas
object.startDrag();
function mouseUpHandler(evt:MouseEvent):void {
var obj = evt.target;
// obj.dropTarget will give us the reference to the shape of
// the object over which we dropped the circle.
var target = obj.dropTarget;
// If the target object exists the we ask the test_match function
// to compare moved obj and target where it was dropped.
if (target != null)
test_match(target, obj);
obj.stopDrag();
function test_match(target,obj) {
// test if either one of the four pairs match
if ( (target == box_slash && obj == slash) ||
(target == box_clapton && obj == clapton) ||
(target == box_hendrix && obj == hendrix) || )
// we got a hit
hits = hits+1;
textField.text = "Correct! :)";
// make the object transparent
obj.alpha = 0.5;
// kill its event listeners - object can't be moved anymore
obj.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
obj.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
// Test if we are done
if (hits == 3)
textField.text = "Well Done";
else
textField.text = "wrong! :(";
the errors are: i have highlighted the lines
Scene 1, Layer 'Actions', Frame 1, Line 39
1084: Syntax error: expecting rightparen before leftbrace.
Scene 1, Layer 'Actions', Frame 1, Line 38
1084: Syntax error: expecting identifier before rightparen.Thankyou very much that does get rid of that error now i get
Scene 1, Layer 'Actions', Frame 1, Line 42
1120: Access of undefined property textField.
Scene 1, Layer 'Actions', Frame 1, Line 51
1120: Access of undefined property textField.
Scene 1, Layer 'Actions', Frame 1, Line 56
1120: Access of undefined property textField.
now im sure this is simple but im as im sure you have figured out im a complete noob to flash
textField.text = "Correct! :)";
textField.text = "Well Done";
textField.text = "wrong! :(";
is this something to do with an instance name? -
In xsd error " expected name insted of "
I am new to xsd ... i got some sxd from My frd
while am copying that xsd in j dev am getting error "expected name insted of "
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.raj.com/e1/rajcenterbom"
targetNamespace="http://www.raj.com/e1/rajcenterbom"
elementFormDefault="qualified">
<xs:element name="DATA">
</xs:schema>
Please help meHay ...
I got this ... its very silly prob
thanks and regards
rky -
Getting error : Expected a child component type of UISelectItem/UISelectIte
Hi,
I am using facelet and third party tool for displaying Grid.
When I am using following code then getting the error :
"Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne"
Code:
<ig:column sortBy="phoneNumber">
<f:facet name="header">
<h:outputText value="Phone Number" />
</f:facet>
<h:selectOneMenu value="#{DATA_ROW.phoneNumber}" >
<f:selectItems value="#{mylist.list1}"/>
</h:selectOneMenu>
</ig:column>
Please suggest to resolve the issue.following is the component tree at which this error is occured:
<HtmlSelectOneMenu disabled="false" id="_ig26" immediate="false" localValueSet="false" readonly="false" rendered="true" required="false" transient="false" valid="true">
<UISelectItems id="_ig27" rendered="true" transient="false"/>
</HtmlSelectOneMenu> -
1086: Syntax Error: expecting semicolon before leftbrace?
Hi guys!
I'm new to this program. Help would be really appreciated.
I keep getting this error: ReferenceError: Error #1065: Variable TCMText is not defined.
In the Compliers Error tab, it also says: Scene 1, Layer 'actions', Frame 1, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
I'm not sure if this is correct, but I used the code snippets to help me on my Actions Frame, but to no avail.
on(release){
_root.gotoAndPlay("2");
/* Click to Go to Next Frame and Stop
Clicking on the specified symbol instance moves the playhead to the next frame and stops the movie.
start_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame_3);
function fl_ClickToGoToNextFrame_3(event:MouseEvent):void
nextFrame();
I don't have a moving animation, but I want my Flash to work similar to a Power Point, so that the person can read the screen, then just click the button symbol to see the next scene. This is for an assignment, and it's due pretty soon. Haven't been able to figure out what's wrong since I'm a noob, thanks.The first bit of code, "onRelease..." is Actionscript 2 and the second bit, "start_btn.addEvent..." is Actionscript 3. You can't mix and match versions of Actionscript in the same file. With nothing selected in the Stage window, look at the Properties window. In the Script section at the top, it will tell you which version of Actionscript you selected for this movie. Try just using the one version that your movie expects to see.
-
Syntax error: expecting rightparen before not.
Another textbook problem!
The step word for word in my textbook is:
The following four lines of code placed above the goto statement for the function called by the home button so the animation does not play when the Home button is clicked.
if (animationInstance.parent != null)
animationinstance.parent.removeChild(animationInstance);
So.. I added this step to my code for the assignment and when I test it, I'm getting error:
Scene 1, Layer 'actions', Frame 1, Line 29 1084: Syntax error: expecting rightparen before not.
Here's my entire code for the frame:
import flash.events.MouseEvent;
stop();
var animationInstance:animationMC = new animationMC();
graphicsBtn.addEventListener(MouseEvent.CLICK, goto2);
function goto2(Event:MouseEvent)
gotoAndStop(2);
animationsBtn.addEventListener(MouseEvent.CLICK, goto3);
function goto3(Event:MouseEvent)
gotoAndStop(3);
formBtn.addEventListener(MouseEvent.CLICK, goto4);
function goto4(Event:MouseEvent)
gotoAndStop(4);
photoBtn.addEventListener(MouseEvent.CLICK, goto5);
function goto5(Event:MouseEvent)
gotoAndStop(5);
homeBtn.addEventListener(MouseEvent.CLICK, goto1);
function goto1(Event:MouseEvent)
if(animationInstance.parent ! = null)
animationInstance.parent.removeChild(animationInstance);
gotoAndStop(1);
Any help is appreciated!!! = should be != no space ( ! is what they are calling "not" -- shoulda just used ! )
And I think I already mentioned to not use "Event" like you do -
Installed Adobe XI Pro trial verison, when compared two pdf files it gives error "Expected a Name Object"..Can some one say how to fix this?
Installed Adobe XI Pro trial verison, when compared two pdf files it gives error "Expected a Name Object"..Can some one say how to fix this?
-
1084: Syntax error: expecting rightbrace before rightparen
Hi,
I am getting the following error when using the below code:
1084: Syntax error: expecting rightbrace before rightparen.
Code:
Buttons.Btn_2.addEventListener(MouseEvent.CLICK,Btn_2ClickHandler);
function Btn_2ClickHandler(event:MouseEvent):void {
navigateToURL (new URLRequest ("http://Main/New_Projects/Album-2.htm"), "_self"));
I am getting this error only after adding , "_self")
Please help.You appear to have one too many right parenthesis in that line. The number of rights should equal the lefts.
-
Argument count mismatch error: Expected 1, got 0.
I am writing a datagridcolumn array to the cookie, and upon retreiving the user data it immediately throws "argument count mismatch error: Expected 1, got 0" on MediaGridColumnInfo(). I assume there is a disconnect between what I am saving and what is expected to receive.
this is how I am saving the array:
public function Save():void
user.data.MediaListGridColumnsArray = new MediaGridColumnInfo(this.datagrid.columns);
user.flush();
when I put a trace on user.data.MediaListGridColumnsArray.columnObject after saving, it shows the correct type [object datagridcolumn].
This is the entire MediaGridColumnInfo class (got this from another thread for solving storing typed object issue):
package digitalmedia.components.entities
import flash.display.Sprite;
import flash.events.*;
import flash.net.SharedObject;
import flash.net.registerClassAlias;
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
import flash.utils.IExternalizable;
public class MediaGridColumnInfo implements IExternalizable
public var columnObject: Array;
public function MediaGridColumnInfo(columnObject: Array)
this.columnObject = columnObject;
public function writeExternal(output:IDataOutput):void
output.writeObject(columnObject);
public function readExternal(input:IDataInput):void
columnObject = input.readObject();
any ideas? thanksI think you can't have required constructor parameters in objects that get
serialized. -
BI Integrated Planning - Formula - Formula error: } expected
Hi
BI Integrated Planning -
While defining the Formula (FOX), we are getting the below error
'Formula error: } expected'
Kindly inform if any one has faced the similar problem / any solution
Thanks in advance
G K MohataGiriraj,
This seems like a syntax error in your formula. It must be specifying a line number where it is finding the error. Please check that or maybe the previous line, for any data processing statement where you missed a <b>}</b>. Could be that you missed in a statement, one or more characteristics. If you cant find it, please paste your whole code here along with complete error message.
Hope this helps. -
XML-0100: (Error) Expected 'EOF'.
I try to parse XML file with Oracle XML
Parser (version 2.0.2.9) for Java.
====================================
CODE 1:
FileInputStream fis = new FileInputStream("...");
DOMParser inParser = new DOMParser();
inParser.parse(_is);
CODE 2:
FileInputStream fis = new FileInputStream("...");
byte readB[] = new byte[1000];
int len = _is.read(readB);
inParser.parse(new ByteArrayInputStrea (readB));
====================================
CODE 1 is working OK, but when I run CODE 2,
I got "XML-0100: (Error) Expected 'EOF'".
I really need second approach (byte array), because I get XML from HTTP POST method.
Can somebody please help me?
thank you
MaticIgnore this post. I allready solve the problem.
I should used:
inParser.parse(new ByteArrayInputStrea (readB, 0, len));
null -
1084: Syntax error: expecting rightbrace before end of program.
So I'm doing this basic coding thing to make an object "shoot" bullets. It's from a tutorial video. My code matches his exactly unless I'm missing a tiny detail. Basically the code looks like this:
package {
import flash.display.Sprite;
import flash.events.Event;
public class bullet extends Sprite {
private var sw:Number;
private var sh:Number;
private const _SPEED:int=-10;
private const _OFFSTAGE:int=-10;
public function bullet():void {
addEventListener(Event.ADDED_TO_STAGE,onadd);
private function onadd(e:Event):void {
sw=stage.stageWidth;
sh=stage.stageHeight;
addEventListener(Event.ENTER_FRAME,loop);
private function loop(e:Event):void {
if (y<_OFFSTAGE) {
removeEventListener(Event.ENTER_FRAME,loop);
parent.removeChild(this);
y-=_SPEED;
}public function removeListeners():void {
removeEventListener(Event.ENTER_FRAME,loop);
And the compiler error I'm getting says this:
Location:bullet.as line 31 1084: Syntax error: expecting rightbrace before end of program. Source: }
Location:bullet.as line 31 1084: Syntax error: expecting rightbrace before end of program. Source: }
And yes it does say it twice. What's going on?
The vid I'm learning from is this: http://autocad.spinelink.com/adobe-flash-cs4-game-tutorial-shooting.htmlYou are missing two closing curly braces at the bottom of the package declaration. You need to close the package itself and the class declaration inside.
package {
import flash.display.Sprite;
import flash.events.Event;
public class bullet extends Sprite {
private var sw:Number;
private var sh:Number;
private const _SPEED:int=-10;
private const _OFFSTAGE:int=-10;
public function bullet():void {
addEventListener(Event.ADDED_TO_STAGE,onadd);
private function onadd(e:Event):void {
sw=stage.stageWidth;
sh=stage.stageHeight;
addEventListener(Event.ENTER_FRAME,loop);
private function loop(e:Event):void {
if (y<_OFFSTAGE) {
removeEventListener(Event.ENTER_FRAME,loop);
parent.removeChild(this);
y-=_SPEED;
public function removeListeners():void {
removeEventListener(Event.ENTER_FRAME,loop);
Maybe you are looking for
-
Hi Friends, Can anyone please let me know how to insert value into particular cell of Excel sheet.I can identify particular cell by column number AA,AB etc) and row number(98,99,100 etc). I am using sql developer.Is there any built in functions?
-
Hi I need help in creating role for DEVELOPERS and HCM GUYS in ERP DEV. sys
Hi Experts I am working as a Support Security Consultant. Now I have assigned to another implemenation Project. My client asks to create 2 roles in DEV. system the requirement is: 1) He asks to create a role for develpoers in dev system fro devepment
-
Bookmarks on Web-Viewed PDFs not working
Hello All, I recently created a PDF in Acrobat Pro X. I added bookmarks to the document which work perfectly when opened directly from the file. However, this is for our webpage. The file is linked so that it opens when the link to it is clicked.
-
Network Printer Problem! Really Frustrating
Hello. I have a Canon PIXMA MP530 connected to a Windows XP Sp3 PC which is on the workgroup. When I set up the printer, I click the Windows tab and select the workgroup, pc name, and printer, select the printer model and then click add. It lists in
-
Hi Everyone, I am very new to J2ME so PLEASE bear with me. I just went through CLDC and MIDP and seems I cant put in the RMI support however I would like to ask a question that can I use the CDC and then use personal/foundation profile to implement R