Error 1013 private function, Help!?

Hey i'm new to this but i've been stuck on this problem for a couple of hours now.. If anybody can see what the problem is that would be great! I've highlighted the line on which the error occurs (line 68) I have my braces correct i believe so i can not see what the problem is. Thanks.
package  {
                    import flash.display.Sprite;
                    import flash.text.TextField;
                    import Classes.P_Circle;
                    import flash.events.MouseEvent;
          public class Main extends Sprite {
                    //private properties
                    private var container:Sprite = new Sprite ();
                    private var textBox:TextField = new TextField ();
                    private var padding:uint = 10;
                    //initialization
                    public function Main() {
                              //adds a random number of images to the contatiner
                              this.makeImages(getRandomNumber(10,5) );
                              //add a mouse listener to container
                              this.container.addEventListener(MouseEvent.CLICK, hitObject);
                              //add the container to the stage
                              stage.addChild(this.container);
                              //function to draw UI and config
                              this.ConfigUI();
                     private function ConfigUI():void {
                              this.textBox.x = 5;
                              this.textBox.y = -10;
                              stage.addChild(textBox);
                    //private methods, calculator
                     private function hitObject(e:MouseEvent):void {
                              //change transparancy of circle
                              e.target.alpha = 0.3;
                              //calculates new x and y for shapes
                              textBox.text = 'x ' + e.target.x + '. y:' + e.target.y;
                    private function makeImages(nImagesToCreate:uint):void {
                                        var obj:P_Circle = new P_Circle(1,1);
                                        // this is to keep the circles from colliding when randomly placed
                                        var maxCols:Number = Math.floor(stage.stageWidth - obj.width - this.padding);
                                        var maxRows:Number = Math.floor(stage.stageHeight - obj.height - 50);
                                        obj = null;
                                        //loop to create as many circles as asked
                                        for (var j:uint = 0; j < nImagesToCreate; j++) {
                                                  //place circle in random posistions
                                                  obj = new P_Circle( getRandomNumber(maxCols, this.padding), getRandomNumber )
                                                  //give it a name
                                                  obj.name = 'circle_'+j;
                                                  //add it to container for display
                                                  this.container.addChild(obj);
                              obj = null;
                              // the sprite contaienr changes its size depending on objects which are on stage
                              trace ('container width: ', container.width);
                              trace ('container height: ', container.height);
        private function getRandomNumber(upperLimit:uint, lowerLimit:uint):uint {
                                  //get random number of circles
                                  var randomNum:Number = Math.floor(Math.random() * (1 + 10 - 5) + 5);
                                        return randomNum;

Arent i telling it to just use randomnumber values within these parameters?
private function makeImages(nImagesToCreate:uint):void {
                                        var obj:P_Circle1 = new P_Circle1(1,1);
                                        // this is figures out where circles are placed, keeps them on screen
                                        var maxCols:Number = Math.floor(stage.stageWidth - obj.width - this.padding);
                                        var maxRows:Number = Math.floor(stage.stageHeight - obj.height - 50);
                                        obj = null;

Similar Messages

  • Need some help with my Input.as file (error 1013)

    Hello, I have just started learning Flash & Actionscript this month and I'm very eager to learn and do new things.
    I wanted to learn to create some games in Flash and I managed to create a basic side scroller and a top down both with movement and collision functions.
    What I'm trying to do now is implementing a fluid movement function in Flash. So I found a tutorial on how to do this on another site(Idk if I'm allowed to post it here ,but I will if you ask) .
    What I basically have is a .fla file linked with a .as file and another .as file called Input.as. The website from which I'm following the tutorial said that this function was invented by the guys from Box2D and it should work properly,but for some reason when I try to run it(Ctrl+Enter) , I have error 1013 on the first line of the .as File saying that :
    Fluid movement project\Input.as, Line 1
    1013: The private attribute may be used only on class property definitions.
    I've looked this error up on the internet and they say it's usually related with missing braces {} ,but I checked my code in the Input.as file and I don't have any missing brace. Here is the Input.as file from the website I'm following my tutorial:
    private function refresh(e:Event):void
        //Key Handler
        if (Input.kd("A", "LEFT"))
            //Move to the left
            dx = dx < 0.5 - _max ? _max * -1 : dx - 0.5;
        if (Input.kd("D", "RIGHT"))
            //Move to the right
            dx = dx > _max - 0.5 ? _max : dx + 0.5;
        if (!Input.kd("A", "LEFT", "D", "RIGHT"))
            //If there is no left/right pressed
            if (dx > 0.5)
                dx = dx < 0.5 ? 0 : dx - 0.5;
            else
                dx = dx > -0.5 ? 0 : dx + 0.5;
        if (Input.kd("W", "UP"))
            //Move up
            dy = dy < 0.5 - _max ? _max * -1 : dy - 0.5;
       if (Input.kd("S", "DOWN"))
            //Move down
            dy = dy > _max - 0.5 ? _max : dy + 0.5;
        if (!Input.kd("W", "UP", "S", "DOWN"))
            //If there is no up/down action
            if (dy > 0.5)
                dy = dy < 0.5 ? 0 : dy - 0.5;
            else
                dy = dy > -0.5 ? 0 : dy + 0.5;
        //After all that, apply these to the object
        square.x += dx;
        square.y += dy;
    I've slightly rearranged the braces from the original code so the code looks nicer to see and understand. Please tell me if I need to supply you any additional info and Thanks!

    If what you showed is all you had for the Input class, then you should probably download all of the source files instead of trying to create them from what is discussed in the tutorial.  Here is what the downloaded Input.as file contains, which resembles a proper class file structure...
    package {
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.utils.*;
    public class Input {
       * Listen for this event on the stage for better mouse-up handling. This event will fire either on a
       * legitimate mouseUp or when flash no longer has any idea what the mouse is doing.
      public static const MOUSE_UP_OR_LOST:String = 'mouseUpOrLost';
      /// Mouse stuff.
      public static var mousePos:Point = new Point(-1000, -1000);
      public static var mouseTrackable:Boolean = false; /// True if flash knows what the mouse is doing.
      public static var mouseDetected:Boolean = false; /// True if flash detected at least one mouse event.
      public static var mouseIsDown:Boolean = false;
      /// Keyboard stuff. For these dictionaries, the keys are keyboard key-codes. The value is always true (a nil indicates no event was caught for a particular key).
      public static var keysDown:Dictionary = new Dictionary();
      public static var keysPressed:Dictionary = new Dictionary();
      public static var keysUp:Dictionary = new Dictionary();
      public static var stage:Stage;
      public static var initialized:Boolean = false;
       * In order to track input, a reference to the stage is required. Pass the stage to this static function
       * to start tracking input.
       * NOTE: "clear()" must be called each timestep. If false is pased for "autoClear", then "clear()" must be
       * called manually. Otherwise a low priority enter frame listener will be added to the stage to call "clear()"
       * each timestep.
      public static function initialize(s:Stage, autoClear:Boolean = true):void {
       if(initialized) {
        return;
       initialized = true;
       if(autoClear) {
        s.addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, -1000, true); /// Very low priority.
       s.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
       s.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp, false, 0, true);
       s.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp, false, 0, true);
       s.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown, false, 0, true);
       s.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove, false, 0, true);
       s.addEventListener(Event.MOUSE_LEAVE, handleMouseLeave, false, 0, true);
       s.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
       stage = s;
       * Record a key down, and count it as a key press if the key isn't down already.
      public static function handleKeyDown(e:KeyboardEvent):void {
        if(!keysDown[e.keyCode]) {
        keysPressed[e.keyCode] = true;
        keysDown[e.keyCode] = true;
       * Record a key up.
      public static function handleKeyUp(e:KeyboardEvent):void {
       keysUp[e.keyCode] = true;
       delete keysDown[e.keyCode];
       * clear key up and key pressed dictionaries. This event handler has a very low priority, so it should
       * occur AFTER ALL other enterFrame events. This ensures that all other enterFrame events have access to
       * keysUp and keysPressed before they are cleared.
      public static function handleEnterFrame(e:Event):void {
       clear();
       * clear key up and key pressed dictionaries.
      public static function clear():void {
       keysUp = new Dictionary();
       keysPressed = new Dictionary();
       * Record the mouse position, and clamp it to the size of the stage. Not a direct event listener (called by others).
      public static function handleMouseEvent(e:MouseEvent):void {
       if(Math.abs(e.stageX) < 900000) { /// Strage bug where totally bogus mouse positions are reported... ?
        mousePos.x = e.stageX < 0 ? 0 : e.stageX > stage.stageWidth ? stage.stageWidth : e.stageX;
        mousePos.y = e.stageY < 0 ? 0 : e.stageY > stage.stageHeight ? stage.stageHeight : e.stageY;
       mouseTrackable = true;
       mouseDetected = true;
       * Get the mouse position in the local coordinates of an object.
      public static function mousePositionIn(o:DisplayObject):Point {
       return o.globalToLocal(mousePos);
       * Record a mouse down event.
      public static function handleMouseDown(e:MouseEvent):void {
       mouseIsDown = true;
       handleMouseEvent(e);
       * Record a mouse up event. Fires a MOUSE_UP_OR_LOST event from the stage.
      public static function handleMouseUp(e:MouseEvent):void {
       mouseIsDown = false;
       handleMouseEvent(e);
       stage.dispatchEvent(new Event(MOUSE_UP_OR_LOST));
       * Record a mouse move event.
      public static function handleMouseMove(e:MouseEvent):void {
       handleMouseEvent(e);
       * The mouse has left the stage and is no longer trackable. Fires a MOUSE_UP_OR_LOST event from the stage.
      public static function handleMouseLeave(e:Event):void {
       mouseIsDown = false;
       stage.dispatchEvent(new Event(MOUSE_UP_OR_LOST));
       mouseTrackable = false;
       * Flash no longer has focus and has no idea where the mouse is. Fires a MOUSE_UP_OR_LOST event from the stage.
      public static function handleDeactivate(e:Event):void {
       mouseIsDown = false;
       stage.dispatchEvent(new Event(MOUSE_UP_OR_LOST));
       mouseTrackable = false;
       * Quick key-down detection for one or more keys. Pass strings that coorispond to constants in the KeyCodes class.
       * If any of the passed keys are down, returns true. Example:
       * Input.kd('LEFT', 1, 'A'); /// True if left arrow, 1, or a keys are currently down.
      public static function kd(...args):Boolean {
       return keySearch(keysDown, args);
       * Quick key-up detection for one or more keys. Pass strings that coorispond to constants in the KeyCodes class.
       * If any of the passed keys have been released this frame, returns true.
      public static function ku(...args):Boolean {
       return keySearch(keysUp, args);
       * Quick key-pressed detection for one or more keys. Pass strings that coorispond to constants in the KeyCodes class.
       * If any of the passed keys have been pressed this frame, returns true. This differs from kd in that a key held down
       * will only return true for one frame.
      public static function kp(...args):Boolean {
       return keySearch(keysPressed, args);
       * Used internally by kd(), ku() and kp().
      public static function keySearch(d:Dictionary, keys:Array):Boolean {
       for(var i:uint = 0; i < keys.length; ++i) {
        if(d[KeyCodes[keys[i]]]) {
         return true;
       return false;

  • HELP!! error 1013 when trying to restore!? PHONE HAS DIED!!

    i tried udating my iphone 3GS with my itunes and it failed asked me to restore my iphone and now wont restore, i just get a message saying "unknown error 1013, unable to restore"?!
    would be very grateful for help as id like to go to sleep!

    First delete all .ipsw files on your computer. In OSX they are located here:
    ~/Library/Application Support/iTunes/iPod/iphone Firmware
    If you have your firewall turned on, disable it. Then see if you can force the phone into recovery mode:
    Leave the USB cable connected to your computer, but NOT your phone, itunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new.
    Also, any reason why you have not updated to 10.6.2? You might try updating to 10.6.2 FIRST & also make sure itunes is up to date, version 9.0.3.

  • Muse jsassert error: calling selctor function type error HELP!

    i upload my site within ftp adobe muse ' and also tried to upload it tru 3rd party program ' and i get this message when i try to open in in microsoft IE ' and google crohme browser
    muse jsassert error: calling selctor function type error unble to get proprty int undifined null refrence
    HELP
    thanks

    The file musesprypanels.js contains bogus extra code at the end that's not part of what Muse generates. It's unclear whether this extra content is present because of some problem on your machine or if it was introduced as part of the upload process. I recommend re-exporting to a new folder (so all files are re-generated) and then re-upload at least the scripts folder. You could also open the index.html file in the local export folder to see whether the JavaScript error is reproducible with your local files. That would indicate whether the corruption to this particular file occurred locally or only on the server.

  • Error 1013: The private attribute may be used only on class property definitions

    Been trying to solve this problem for the past 4 hours, been searching all over different forums and I still don't get it, I'm a complete newbie with AS3 and just starting to learn it. Can someone tell me what I have done wrong to get this error.
    package {
              import flash.display.Sprite;
              import flash.events.Event;
              public class Main extends Sprite {
                        private const FIELD_WIDTH:uint=16;
                        private const FIELD_HEIGHT:uint=12;
                        private const TILE_SIZE:uint=40;
                        private var the_snake:the_snake_mc;
                        private var snakeDirection:uint;
                        private var snakeContainer:Sprite= new Sprite();
                        private var bg:bg_mc=new bg_mc();
                        public function Main() {
                                  addChild(bg);
                                  placeSnake(); }
                                  addEventListener(Event.ENTER_FRAME,onEnterFr);
    private function placeSnake():void {
              addChild(snakeContainer);
              var col:uint=Math.floor(Math.random()*(FIELD_WIDTH-10))+5;
              var row:uint=Math.floor(Math.random()*(FIELD_HEIGHT-10))+5;
              snakeDirection=Math.floor(Math.random()*4);
              the_snake=new the_snake_mc(col*TILE_SIZE,row*TILE_SIZE,snakeDirection+1);
              snakeContainer.addChild(the_snake);
              switch (snakeDirection) {
                        case 0 : // facing left
                        trace("left");
                        the_snake = new the_snake_mc((col+1)*TILE_SIZE,row*TILE_SIZE,6);
                        snakeContainer.addChild(the_snake);
                        the_snake = new the_snake_mc((col+2)*TILE_SIZE,row*TILE_SIZE,6);
                        snakeContainer.addChild(the_snake);
                        break;
                        case 1 : // facing up
                        trace ("up");
                        the_snake = new the_snake_mc(col*TILE_SIZE,(row+1)*TILE_SIZE,5);
                        snakeContainer.addChild(the_snake);
                        the_snake = new the_snake_mc(col*TILE_SIZE,(row+2)*TILE_SIZE,5);
                        snakeContainer.addChild(the_snake);
                        break;
                        case 2 : // facing down
                        trace ("down");
                        the_snake = new the_snake_mc((col-1)*TILE_SIZE.row*TILE_SIZE,6);
                        snakeContainer.addChild(the_snake);
                        the_snake = new the_snake_mc((col-2)*TILE_SIZE.row*TILE_SIZE,6);
                        snakeContainer.addChild(the_snake);
                        break
                        case 3 : // facing right
                        trace ("right");
                        the_snake = new the_snake_mc(col*TILE_SIZE,(row-1)*TILE_SIZE,5);
                        snakeContainer.addChild(the_snake);
                        the_snake = new the_snake_mc(col*TILE_SIZE,(row-2)*TILE_SIZE,5);
                        snakeContainer.addChild(the_snake);
                        break;
    private function onEnterFr(e:Event) {     <<   ERROR ON THIS LINE
              var the_head:the_snake_mc=snakeContainer.addChildAt(0) as the_snake_mc;
              var new_piece:the_snake_mc=new the_snake_mc(the_head.x,the_head.y,1);
              snakeContainer.addChildAt(new_piece,1);
              var the_body:the_snake_mc=snakeContainer.getChildAt(2) as the_snake_mc;
              var p:uint=snakeContainer.numChildren;
              var the_tail:the_snake_mc=snakeContainer.getChildAt(p-1) as the_snake_mc;
              var the_new_tail:the_snake_mc=snakeContainer.getChildAt(p-2) as the_snake_mc;
              the_head.moveHead(snakeDirection,TILE_SIZE);
              // brute force
              if (is_up(new_piece,the_head)&&is_down(new_piece,the_body)) {
                        new_piece.gotoAndStop(5);
              if (is_down(new_piece,the_head)&&is_up(new_piece,the_body)) {
                        new_piece.gotoAndStop(5);
              if (is_left(new_piece,the_head)&&is_right(new_piece,the_body)) {
                        new_piece.gotoAndStop(6);
              if (is_right(new_piece,the_head)&&is_left(new_piece,the_body)) {
                        new_piece.gotoAndStop(6);
              // end of brute force
              snakeContainer.removeChild(the_tail);

    does this solve your problem
    package
              import flash.display.Sprite;
              import flash.events.Event;
              public class Main extends Sprite
                        private const FIELD_WIDTH:uint = 16;
                        private const FIELD_HEIGHT:uint = 12;
                        private const TILE_SIZE:uint = 40;
                        private var the_snake:the_snake_mc;
                        private var snakeDirection:uint;
                        private var snakeContainer:Sprite = new Sprite();
                        private var bg:bg_mc = new bg_mc();
                        public function Main()
                                  addChild(bg);
                                  placeSnake();
                                  addEventListener(Event.ENTER_FRAME, onEnterFr);
                        private function placeSnake():void
                                  addChild(snakeContainer);
                                  var col:uint = Math.floor(Math.random() * (FIELD_WIDTH - 10)) + 5;
                                  var row:uint = Math.floor(Math.random() * (FIELD_HEIGHT - 10)) + 5;
                                  snakeDirection = Math.floor(Math.random() * 4);
                                  the_snake = new the_snake_mc(col * TILE_SIZE, row * TILE_SIZE, snakeDirection + 1);
                                  snakeContainer.addChild(the_snake);
                                  switch (snakeDirection)
                                            case 0: // facing left
                                                      trace("left");
                                                      the_snake = new the_snake_mc((col + 1) * TILE_SIZE, row * TILE_SIZE, 6);
                                                      snakeContainer.addChild(the_snake);
                                                      the_snake = new the_snake_mc((col + 2) * TILE_SIZE, row * TILE_SIZE, 6);
                                                      snakeContainer.addChild(the_snake);
                                                      break;
                                            case 1: // facing up
                                                      trace("up");
                                                      the_snake = new the_snake_mc(col * TILE_SIZE, (row + 1) * TILE_SIZE, 5);
                                                      snakeContainer.addChild(the_snake);
                                                      the_snake = new the_snake_mc(col * TILE_SIZE, (row + 2) * TILE_SIZE, 5);
                                                      snakeContainer.addChild(the_snake);
                                                      break;
                                            case 2: // facing down
                                                      trace("down");
                                                      the_snake = new the_snake_mc((col - 1) * TILE_SIZE.row * TILE_SIZE, 6);
                                                      snakeContainer.addChild(the_snake);
                                                      the_snake = new the_snake_mc((col - 2) * TILE_SIZE.row * TILE_SIZE, 6);
                                                      snakeContainer.addChild(the_snake);
                                                      break;
                                            case 3: // facing right
                                                      trace("right");
                                                      the_snake = new the_snake_mc(col * TILE_SIZE, (row - 1) * TILE_SIZE, 5);
                                                      snakeContainer.addChild(the_snake);
                                                      the_snake = new the_snake_mc(col * TILE_SIZE, (row - 2) * TILE_SIZE, 5);
                                                      snakeContainer.addChild(the_snake);
                                                      break;
                        private function onEnterFr(e:Event)
                                  var the_head:the_snake_mc = snakeContainer.addChildAt(0) as the_snake_mc;
                                  var new_piece:the_snake_mc = new the_snake_mc(the_head.x, the_head.y, 1);
                                  snakeContainer.addChildAt(new_piece, 1);
                                  var the_body:the_snake_mc = snakeContainer.getChildAt(2) as the_snake_mc;
                                  var p:uint = snakeContainer.numChildren;
                                  var the_tail:the_snake_mc = snakeContainer.getChildAt(p - 1) as the_snake_mc;
                                  var the_new_tail:the_snake_mc = snakeContainer.getChildAt(p - 2) as the_snake_mc;
                                  the_head.moveHead(snakeDirection, TILE_SIZE);
                                  // brute force
                                  if (is_up(new_piece, the_head) && is_down(new_piece, the_body))
                                            new_piece.gotoAndStop(5);
                                  if (is_down(new_piece, the_head) && is_up(new_piece, the_body))
                                            new_piece.gotoAndStop(5);
                                  if (is_left(new_piece, the_head) && is_right(new_piece, the_body))
                                            new_piece.gotoAndStop(6);
                                  if (is_right(new_piece, the_head) && is_left(new_piece, the_body))
                                            new_piece.gotoAndStop(6);
                                  // end of brute force
                                  snakeContainer.removeChild(the_tail);

  • MuseJSAssert: Error calling selector function:TypeError: Cannot read property 'msie' of undefined. Please help me in this.

    MuseJSAssert: Error calling selector function:TypeError: Cannot read property 'msie' of undefined. Please help me in this.

    Hi
    Please check the following thread,
    Re: MuseJSAssert: Error Calling Selector Function:[Object Error]
    Do let me know if you have any question.

  • This message always appears: [JavaScript Application] "Error: missing } after function body" Please, i need help with this.

    A window appears with this message : [JavaScript Applicaction] Error: missing } after function body.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • 3.1.2 no Baseband and error 1013 when recovering iPhone3GS

    Hi. I'm having this strange problem that it actually seems like im the only guy with a 3GS that have ever had that problem.
    well here it goes, i have my lovely iphone 3GS with firmware 3.1.2 but it crashed earlier yesterday when i tried to restore my device in order to have it fully reset, i now really regret i didn't just use the delete all and reset function in the iphone.
    But i've been unable to restore my device until i after several restarts of the pc and both trying to restore in DFU and recover mode it finally happened that myiphone got detected.
    But when i then try to update it with the stock 3.1.2 it goes fine until it reaches the point where the baseband is installed, it keep pinging but nothing happens, and after a quite while Itunes end up saying the error 1013.
    The only possible way to get it to the screen is by jailbreaking the device and that still doesn't help me since no one have ever posted about it on the internet.
    And just the make sure that you doesn't suggest or ask about this, i can't install any Firmware that is not directly from Apple since it just says that my iphone is not elligible to that software.
    the main thing that is wrong is the fact that i don't have any; Network, Carrier, Wi-Fi adress, Bluetooth, IMEI, ICCID nor Modem Firmware, they are either blank or just showing up like N/A and the bluetooth with a adress like 00:00:00
    Here's a log of the Update
    http://rapidshare.com/files/314326770/iPhoneUpdater.log.html

    i can see why you think its related to jailbreaking because i say the stock 3.1.2 which means i've been trying to use a version not downloaded by itunes itself but saved to a known direction and then tried to update it with the windows+recover method.
    it wasn't jailbreaked until i started seeking any possible way to fix it
    since Apple seriously fail at their support site i don't get any help from that site you reffered to, i've tried every solution but still not a thing have been changed.
    EDIT: by failing i mean that the site is refering to a lot of error messages but it doesn't tell how to solve a specific error.
    Message was edited by: ZulzZ

  • Public n private function in pl/sql

    hello guyz,
    i wanna create a package which contains public function and private function.
    the package should contain finding highest number as one private function and lowest number as the other private function. Also i need a public function which uses the above private functions to display the result.
    Your help is appreciated.

    Here is a sample script from where you should take the concept and implement it in your case --
    satyaki>create or replace package pack_vakel
      2  is
      3    procedure aa(a in number,b out varchar2);
      4  end;
      5  /
    Package created.
    satyaki>
    satyaki>create or replace package body pack_vakel
      2  is
      3    procedure test_a(x in varchar2,y out varchar2)
      4    is
      5      str varchar2(300);
      6    begin
      7      str := 'Local ->'||x;
      8      y := str;
      9    end;
    10   
    11    procedure aa(a in number,b out varchar2)
    12    is
    13      cursor c1(eno in number)
    14      is
    15        select ename
    16        from emp
    17        where empno = eno;
    18       
    19      r1 c1%rowtype;
    20     
    21      str2  varchar2(300);
    22      str3  varchar2(300);
    23    begin
    24      open c1(a);
    25      loop
    26        fetch c1 into r1;
    27        exit when c1%notfound;
    28        str2 := r1.ename; 
    29      end loop;
    30      close c1;
    31     
    32      test_a(str2,str3);
    33      b := str3;
    34    exception
    35      when others then
    36        b := sqlerrm;
    37    end;
    38  end;
    39  /
    Package body created.
    satyaki>
    satyaki>
    satyaki>set serveroutput on
    satyaki>
    satyaki>
    satyaki>declare
      2    u   number(10);
      3    v   varchar2(300);
      4  begin
      5    u:= 7369;
      6    pack_vakel.aa(u,v);
      7    dbms_output.put_line(v);
      8  end;
      9  /
    Local ->SMITH
    PL/SQL procedure successfully completed.
    satyaki>
    satyaki>declare
      2    p   varchar2(300);
      3    q   varchar2(300);
      4  begin
      5    p:= 'SMITH';
      6    pack_vakel.test_a(p,q);
      7    dbms_output.put_line(q);
      8  exception
      9   when others then
    10    dbms_output.put_line(sqlerrm);
    11  end;
    12  /
      pack_vakel.test_a(p,q);
    ERROR at line 6:
    ORA-06550: line 6, column 14:
    PLS-00302: component 'TEST_A' must be declared
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignoredRegards.
    Satyaki De.

  • Compiler Error: 1120 / 1067. please help!

    I've been stuck on this error for a whole day now, trying to find out whats wrong. im new to AS3, but i have been following the tutorials with lynda.com
    i've been trying to make a scrollbar and everything works fine, until i have to connect it with the text. theres an image and a title that i want to scroll with the (static) text so i created a movie clip (instance name cafe_txt), and when i wrote the script and tested the movie, i come up with the 1120 error that cafe_txt is not defined.
    So i changed the clip(thinking that the problem was the scrollbar had to be in the same instance as the text) so that the scrollbar was inside, and i come up with error 1067(1067: Implicit coercion of a value of type flash.display:MovieClip to an unrelated type flash.text:TextField.)
    I've tried changing names, double checking that instance names are correct, moving things, changing the text so that its dynamic not static(if the scrollbar is connected to just the dynamic text it works, it just doesnt scroll the full length of the text)
    here's the code in my stage:
    scrollbar_mc.textField = cafe_txt
    and my code from the scrollbar.as file:
    package com.lynda.ui
        import flash.display.*;
        import flash.events.*;
        import flash.geom.Rectangle;
        import flash.text.TextField;
        public class Scrollbar extends Sprite
            public var value:Number;
            public var padding:Number = 5;
            private var _textField:TextField;
            private var max:Number;
            private var min:Number;
            public function Scrollbar()
                min = bar_mc.y;
                max = bar_mc.height - drag_mc.height;
                drag_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragHandle);
            private function dragHandle(event:MouseEvent):void
                drag_mc.startDrag(false, new Rectangle(0,min,0,max));
                stage.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
                stage.addEventListener(MouseEvent.MOUSE_MOVE, updateValue);
            private function stopDragging(event:MouseEvent):void
                drag_mc.stopDrag();
                stage.removeEventListener(MouseEvent.MOUSE_UP, stopDragging);
                stage.removeEventListener(MouseEvent.MOUSE_MOVE, updateValue);
            private function updateValue(event:MouseEvent=null):void
                value = (drag_mc.y - min) / max;
                if(_textField && event)
                    _textField.scrollV = Math.ceil(value * _textField.maxScrollV);
                dispatchEvent(new Event(Event.CHANGE));
            public function set textField(tf:TextField):void
                _textField = tf;
            public function get textField():TextField
                return _textField;
    thanks for the help...

    click file/publish settings/flash and tick "permit debugging".  retest.  the problematic line of code will be listed in the error message.
    copy and paste the error message and highlight the problematic line of code.

  • Certificate issues Active Directory Certificate Services could not process request 3699 due to an error: The revocation function was unable to check revocation because the revocation server was offline. 0x80092013

    Hi,
    We have some problems with our Root CA. I can se a lot of failed requests. with the event id 22: in the logs. The description is: Active Directory Certificate Services could not process request 3686 due to an error: The revocation function was unable to
    check revocation because the revocation server was offline. 0x80092013 (-2146885613).  The request was for CN=xxxxx.ourdomain.com.  Additional information: Error Verifying Request Signature or Signing Certificate
    A couple of months ago we decomissioned one of our old 2003 DCs and it looks like this server might have had something to do with the CA structure but I am not sure whether this was in use or not since I could find the role but I wasn't able to see any existing
    configuration.
    Let's say that this server was previously responsible for the certificates and was the server that should have revoked the old certs, what can I do know to try and correct the problem?
    Thank you for your help
    //Cris

    hello,
    let me recap first:
    you see these errors on a ROOT CA. so it seems like the ROOT CA is also operating as an ISSUING CA. Some clients try to issue a new certificate from the ROOT CA and this fails with your error mentioned.
    do you say that you had a PREVIOUS CA which you decomissioned, and you now have a brand NEW CA, that was built as a clean install? When you decommissioned the PREVIOUS CA, that was your design decision to don't bother with the current certificates that it
    issued and which are still valid, right?
    The error says, that the REQUEST signature cannot be validated. REQUESTs are signed either by itself (self-signed) or if they are renewal requests, they would be signed with the previous certificate which the client tries to renew. The self-signed REQUESTs
    do not contain CRL paths at all.
    So this implies to me as these requests that are failing are renewal requests. Renewal requests would contain CRL paths of the previous certificates that are nearing their expiration.
    As there are many such REQUEST and failures, it probably means that the clients use AUTOENROLLMENT, which tries to renew their current, but shortly expiring, certificates during (by default) their last 6 weeks of lifetime.
    As you decommissioned your PREVIOUS CA, it does not issue CRL anymore and the current certificates cannot be checked for validity.
    Thus, if the renewal tries to renew them by using the NEW CA, your NEW CA cannot validate CRL of the PREVIOUS CA and will not issue new certificates.
    But it would not issue new certificates anyway even if it was able to verify the PREVIOUS CA's CRL, as it seems your NEW CA is completely brand new, without being restored from the PREVIOUS CA's database. Right?
    So simply don't bother :-) As long as it was your design to decommission the PREVIOUS CA without bothering with its already issued certificates.
    The current certificates which autoenrollment tries to renew cannot be checked for validity. They will also slowly expire over the next 6 weeks or so. After that, autoenrollment will ask your NEW CA to issue a brand new certificate without trying to renew.
    Just a clean self-signed REQUEST.
    That will succeed.
    You can also verify this by trying to issue a certificate on an affected machine manually from Certificates MMC.
    ondrej.

  • Error in convert function

    Hi
    I am using this query for retreiving the records from sql server.
    When the query
    select "e1" as emp,"e2" as date,"e3" as one_year rom "tablename"@databaselink
    it is working fine but when the same query is used with the convert function on one of the column like
    select "e1" as emp,convert(varchar,"e2",101) as date,"e3 as one from from "tablename"@databaselink
    it is saying ora-00936 error missing expression
    please help in this

    Hi,
    So, just to be clear - you are using a database link to connect from an Oracle database to a Microsoft SQL Server database?
    Have you been able to run basic SQL statements across the database link (i.e. just a plain 'SELECT * FROM')? Also, does this same SQL work okay when you run it directly against SQL Server (not through the DB Link from Oracle)?

  • I am getting this error :The right function requires 2 argument(s).

    declare 
    @startdate datetime,
    @enddate datetime 
    SET @STARTDATE ='01-MAR-2014'
    SET @enddate = '01-MAR-2014'
    Set @StartDate = Convert(datetime, Convert(char(10), @StartDate, 120) + ' 00:00:00', 120)
    set @enddate =convert(datetime,Convert(char(10),@enddate, 120) + ' 23:59:59',120) 
    SELECT 
    [row_date]
    ,[logid]
    ,CONVERT(VARCHAR(6), (ISNULL(SUM([acwouttime] + [auxouttime] + [holdtime]), 0))/3600) + 
    ':' + RIGHT('0' + CONVERT(varchar(2),(ISNULL(SUM([acwouttime] + [auxouttime] + [holdtime]), 0)) % 3600) / 60), 2)
    + ':' + RIGHT('0' + CONVERT(varchar(2), (ISNULL(SUM([acwouttime] + [auxouttime] + [holdtime]), 0)) % 60), 2)AS HoldTime
    FROM [CMSData].[dbo].[hagent2]
    WHERE ([logid] IN (1382, 1493,1382,1493,1444,1466,1301,1074,1655,
    1749,1685,1686,1684,1617,1681,1792,1595,1597,1687,1622))
    AND (row_date BETWEEN  @StartDate AND @EndDate)
    GROUP BY 
    [row_date]
    ,[logid]
    hi friends when I am executing this query I am getting this error please help me I will grateful to you .
    ERROR: The right function requires 2 argument(s).

    you may be better off making date filter as below
    declare
    @startdate datetime,
    @enddate datetime
    SET @STARTDATE ='01-MAR-2014'
    SET @enddate = '02-MAR-2014'
    AND (row_date >= @StartDate AND row_date <@EndDate)
    see
    http://visakhm.blogspot.in/2012/12/different-ways-to-implement-date-range.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Error creating RFC function /BODS/ABAP_RUN : RFC_ABAP_EXCEPTION-(Exception_Key: FU_NOT_FOUND, SY-MSGTY: E, SY-MSGID: FL,

    Hi Expert,
    I try to execute job on development system but he showed error "Error creating RFC function </BODS/ABAP_RUN>: <RFC_ABAP_EXCEPTION-(Exception_Key: FU_NOT_FOUND, SY-MSGTY: E, SY-MSGID: FL, SY-MSGNO: 046, SY-MSGV1: /BODS/ABAP_RUN)>. Notify Customer Support.
    In ECC I use ABAP execute option as Execute Preloaded. How to solve this problem? Thanks for your advise.

    Dear,
    have you checked in EXX wether the function group /BODS/BODS is available?
    Some notes here:
    You will have to have to import the new ABAP Program group "BODS/BOS" which you can find in the local install folder...
    Here are some details:
    Installing Functions on the SAP Server
    SAP BusinessObjects Data Services provides functions that support the use of the ABAP, BAPI, and
    IDoc interfaces on SAP servers. You will need some or all of these functions in the normal operation
    of the software in an SAP environment. These functions perform such operations as dynamically loading
    and executing ABAP programs from Data Services, efficiently running preloaded ABAP programs,
    allowing for seamless metadata browsing and importing from SAP servers, and reporting the status of
    running jobs. Some of these functions read data from SAP NetWeaver BW sources.
    You must upload the provided functions to your SAP server in a production environment. It is
    recommended that you always upload the functions to your SAP server whether you are in a
    development, test, or production environment. The functions provide seamless integration between
    Data Services and SAP servers.
    The default installation places two function module files for SAP servers in the ...\Data
    Services\Admin\R3_Functions\transport directory. You then upload these files to SAP servers
    using the SAP Correction and Transport System (CTS) or manually. Using CTS allows for version
    control as the functions evolve across releases.
    The installation provides two versions of transport files (depending on the server version you are using)
    to install the functions on the SAP server. To obtain the names of the latest transport files for installing
    or upgrading these SAP server functions, see the readme.txt file
    And I've found those files and text files in the local install folder....in:
    Program Files\SAP BusinessObjects\Data Services\admin\R3_Functions
    (that's where I've installed it).
    There you'll find some descriptive txt as how to proceed.
    After installing, it might happen that the executing user is missing some authorizations.
    Here my authorizations team helped me by tracing the user and then adding the necessary rights.
    Sure hope this will help you.
    Notes to check:
    see SAP Note 1919255
    Note 1916294

  • Internal error in FORM/FUNCTION get_prkexx(saplckmo) in position 10 with RC

    Hi,
    When we try to post good movements in MFBF, the system gives the error message C+099 which says "Internal error in FORM/FUNCTION get_prkexx(saplckmo) in position 10 with RC".
    We have been implemented the sap notes which are shown below:
    0001096890
    0001126497
    0001164684
    0001230454
    However, it doesn't solve our problem.
    Can you please help us to solve this problem?
    Thanks&Regards,
    Begü

    Dear,
    Just debug the program and check it.
    Also pls check these NOTES,
    414204, 933809, 390655
    Regards,
    R.Brahmankar

Maybe you are looking for

  • Using 'Calendar' control type in prompt - not available

    Hi All, I am trying to setup a simple from and to date prompt that can be used in my reports to set the to and from date range for filtering the fact data that is returned. Following a number of blogs and articles on this it seems pretty straightforw

  • Logging in as guest destroyed main account home directory.

    Just quietly, I'm about ready to smash every piece of Apple hardware I have to pieces. 1. I set up guest account access 2. Logged out of my account. So far so good. 3. Logged into guest account. All normal. 4. Logged out of guest account. 5. Logged i

  • How do I run the SW in single phase mode?

    How do I run the SW in single phase mode?

  • Email body text formating

    Hi ALL, I need to display the following data in the email body with Material records and DIR records Line 1 (Header Line): "Material Master Records " Line 2: [ space ] Line 3 (New Record): Material Number              Material Desc.          MatGrp  

  • Oracle Database 10g Express Edition Bugs

    Product:Oracle Database 10g Express Edition Title:Tab Order Sequence on Login window Description: Tab Order sequence in Login window not proper, it should be proper Reproduce Steps: - Click on Run Application icon - Login Window opened - Press the Ta