1136: Wrong Number of Arguments

Hi,
I'm a flash beginner and I wanted to do a "Space Invaders" like game. Now I get an error, wehn I try to call a function in an other function.is that not allowed? I want that the Bullet shoots directly when I click. but when I hold the left mouse button pressed, the mode should be auto shoot and bullets should shoot out with a timer of 100. I got sucsess by writing both in the start shoot timer, like this:
public function startShootTimer (e:MouseEvent):void {
            ShootTimer.start();
            var bullet:Bullet = new Bullet();
            bullet.x = bazooka.x + 70;
            bullet.y = bazooka.y - 3;
            addChild(bullet);
            Bullets.push(bullet);
But it would be better (for future projects) to have 2 functions, or not ? Is that possible ? Very thank you for your help ! Here's my full not working program:
package  {
    import flash.display.*;
    import flash.events.Event;
    import flash.utils.Timer;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    public class Main extends MovieClip {
        var bazooka:Bazooka = new Bazooka();
        var Bullets:Array = new Array();
        var ShootTimer:Timer = new Timer(500);
        public function Main() {
            startGame();
        public function startGame() {
            addPlayer();
            stage.addEventListener(Event.ENTER_FRAME, mainLoop);
            ShootTimer.addEventListener(TimerEvent.TIMER, autoShootBullet);
            stage.addEventListener(MouseEvent.MOUSE_DOWN, startShootTimer);
            stage.addEventListener(MouseEvent.MOUSE_DOWN, shootBullet);
            stage.addEventListener(MouseEvent.MOUSE_UP, stopShootTimer);
        public function addPlayer():void {
            bazooka.x = 0;
            bazooka.y = stage.stageHeight * .5;
            addChild(bazooka);
        public function shootBullet(e:MouseEvent):void {
            var bullet:Bullet = new Bullet();
            bullet.x = bazooka.x + 70;
            bullet.y = bazooka.y - 3;
            addChild(bullet);
            Bullets.push(bullet);
        public function startShootTimer (e:MouseEvent):void {
            ShootTimer.start();
        public function stopShootTimer (e:MouseEvent):void {
            ShootTimer.stop();
        public function autoShootBullet (e:TimerEvent):void {
            shootBullet();      // Heres my error
        public function mainLoop (e:Event):void {
            for (var b:int = 0; b < Bullets.length; b++) {
                Bullets[b].x += 20;

that's allowed.
but your shootBullet function expects a mouse event to be passed as a parameter.  there are two quick and easy ways to resolve:
1.  use shootBullet(null)
2.  change your shootBullet function to:
  public function shootBullet(e:MouseEvent=null):void {
            var bullet:Bullet = new Bullet();
            bullet.x = bazooka.x + 70;
            bullet.y = bazooka.y - 3;
            addChild(bullet);
            Bullets.push(bullet);

Similar Messages

  • Error: Wrong number of arguments in method

    Hi all,
              I keep getting the above mentioned error when compiling simple JSPs with
              only a few lines of codes. Here are the log dump.
              Mon Aug 07 20:02:30 GMT+08:00 2000:<I> <ServletContext-General> file: init
              Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
              resource 'language.html' in document root 'C:\weblogic\myserver\public_html'
              Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
              resource 'top.html' in document root 'C:\weblogic\myserver\public_html'
              Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
              resource 'language.html' in document root 'C:\weblogic\myserver\public_html'
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: init
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              verbose initialized to: true
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              packagePrefix initialized to: jsp
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              compileCommand initialized to: C:/jdk1.2.2/bin/javac.exe
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              superclass initialized to null
              Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              workingDir initialized to: C:\weblogic\myserver\classfiles
              Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
              pageCheckSeconds initialized to: 1
              Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> *.jsp:
              initialization complete
              Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> Generated
              java file: C:\weblogic\myserver\classfiles\jsp\helloworld.java
              Mon Aug 07 20:02:59 GMT+08:00 2000:<E> <ServletContext-General> Compilation
              of C:\weblogic\myserver\classfiles\jsp\helloworld.java failed:
              C:\weblogic\myserver\classfiles\jsp\helloworld.java:54: Wrong number of
              arguments in method.
              if (sci.isResourceStale("/helloworld.jsp", 933320916000L, "5.1.0
              Service Pack 4 06/29/2000 18:18:23 #74560")) return true;
              ^
              C:\weblogic\myserver\classfiles\jsp\helloworld.java:55: Wrong number of
              arguments in method.
              if (sci.isResourceStale("/dukebanner.html", 933321078000L, "5.1.0
              Service Pack 4 06/29/2000 18:18:23 #74560")) return true;
              ^
              2 errors
              java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath,
              c:\weblogic\lib\weblogic510sp4boot.jar;c:\weblogic\myserver\User.jar;c:\webl
              ogic\myserver\Person.jar;c:\weblogic\myserver\TradingAccount.jar;c:\weblogic
              \myserver\uniquesequence.jar;c:\weblogic\myserver\stockbroker.jar;;C:\jdk1.2
              .2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\w
              eblogic\eval\cloudscape\lib\cloudscape.jar;c:\weblogic\lib\weblogic510sp4.ja
              r;c:\weblogic\license;c:\weblogic\classes;c:\weblogic\myserver\serverclasses
              ;c:\weblogic\lib\weblogicaux.jar;C:\weblogic\myserver\tmp_deployments\ejbjar
              -10126.jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\weblogic\myserv
              er\tmp_deployments\ejbjar-10125.jar;C:\weblogic\myserver\tmp_deployments\ejb
              jar-10124.jar;C:\weblogic\myserver\tmp_deployments\ejbjar-10123.jar;C:\weblo
              gic\myserver\tmp_deployments\ejbjar-10122.jar;C:\weblogic\myserver\tmp_deplo
              yments\ejbjar-10121.jar;C:\weblogic\myserver\servletclasses;C:\weblogic\myse
              rver\classfiles, -d, C:\weblogic\myserver\classfiles,
              C:\weblogic\myserver\classfiles\jsp\helloworld.java])
              at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
              a, Compiled Code)
              at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              Mon Aug 07 20:02:59 GMT+08:00 2000:<E> <ServletContext-General> Servlet
              failed with Exception
              java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath,
              c:\weblogic\lib\weblogic510sp4boot.jar;c:\weblogic\myserver\User.jar;c:\webl
              ogic\myserver\Person.jar;c:\weblogic\myserver\TradingAccount.jar;c:\weblogic
              \myserver\uniquesequence.jar;c:\weblogic\myserver\stockbroker.jar;;C:\jdk1.2
              .2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\w
              eblogic\eval\cloudscape\lib\cloudscape.jar;c:\weblogic\lib\weblogic510sp4.ja
              r;c:\weblogic\license;c:\weblogic\classes;c:\weblogic\myserver\serverclasses
              ;c:\weblogic\lib\weblogicaux.jar;C:\weblogic\myserver\tmp_deployments\ejbjar
              -10126.jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\weblogic\myserv
              er\tmp_deployments\ejbjar-10125.jar;C:\weblogic\myserver\tmp_deployments\ejb
              jar-10124.jar;C:\weblogic\myserver\tmp_deployments\ejbjar-10123.jar;C:\weblo
              gic\myserver\tmp_deployments\ejbjar-10122.jar;C:\weblogic\myserver\tmp_deplo
              yments\ejbjar-10121.jar;C:\weblogic\myserver\servletclasses;C:\weblogic\myse
              rver\classfiles, -d, C:\weblogic\myserver\classfiles,
              C:\weblogic\myserver\classfiles\jsp\helloworld.java])
              at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
              a, Compiled Code)
              at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              I believe that it has got something to do with the configuration of the
              server and not the code in the JSPs. Have anyone encountered this error
              before? Pls advice thanx!
              Cheers,
              kianhui
              

    double d[] = new double[300];
    getMax(d);Pass the array, not an element in the array.

  • ui:ContextMenuItem in MXML causes Error 1136: Incorrect number of arguments

    Hello,
    I'm trying to define a context menu declaratively like so:
    quote:
    <ui:ContextMenu id="editChartDataContextMenu">
    <ui:customItems>
    <mx:Array>
    <ui:ContextMenuItem caption="Clear"/>
    </mx:Array>
    </ui:customItems>
    </ui:ContextMenu>
    However, the Flex compiler gives an error for the line that
    reads "<ui:ContextMenuItem ....". (the line in boldface).
    The error is: 1136: Incorrect number of arguments. Expected
    1.
    Needless to say, I have experimented with varying number of
    attributes, but no luck.
    I have googled in vain to find examples where context menus
    are built up using markup; all examples seem to be imperative
    (ActionScript) code, instead of declarative.
    Any ideas?
    Joubert

    I know context menus can be used in limited situations with
    limited functionality in Flex. Don't know if your usage is within
    the ways context menus are used in Flex.

  • Wrong number of arguments in method

    i have made on jar file in which i have one method let say String c(String a, String b,String c).
    i am calling this method in my jsp like
    String num = c(String a, String b, String c)
    but giving error
    500 internal server error
    Wrong number of arguments in method.
    thanks

    I assume you have this in a Java snippet and the method is defined within the JSP. Ok, then you should call as follows:
    String num = c(a,b,c);
    When you call a method, you don't include the Types in the call-- that's only when you define the method.
    Hope this helps.

  • Procedure - Execute - Wrong Number of Arguments...

    Hi All,
    I am using the following block for executing procedure.
    But iam getting OUT parameter error.
    Error
    ORA:06550: line4,column9:
    PLS:00306: wrong number or arguments in call to PROCSS_PROC
    ORA:06550: line 4,column9
    PL/SQL: statement ignored
    DECLARE
       l_status      NUMBER(1);
    BEGIN
                SCHEMA_NAME.PKG_NAME.PROCSS_PROC
                      (  3,    --> Days to be purged
                         T_TYPE('TABLE_1','TABLE_2','TABLE_3'),
                      l_status
            DBMS_OUTPUT.PUT_LINE('l_status - '|| l_status);
    END;
    Main Package procedure
    CREATE OR REPLACE PACKAGE pkg_name
    AS
       TYPE T_TYPE IS TABLE OF VARCHAR2 (4000);
       PROCEDURE PROCSS_PROC
                    p_freq          IN       NUMBER,         
                    p_multi_tab     IN       T_TYPE,    
                    p_res           OUT      NUMBER
    END pkg_name;                                             --End of Package
    CREATE OR REPLACE PACKAGE BODY pkg_name
    AS
       PROCEDURE PROCSS_PROC (
                    p_freq          IN       NUMBER,         
                    p_multi_tab     IN       T_TYPE,    
                    p_res           OUT      NUMBER   )
       IS
       BEGIN
          --Setting the local variable to check whether the procedure executed successfully or not.
          --If it returns '0'; then all the process haven't got successfully completed
          --If it returns '1'; then all process got success
          p_res := 0;
          p_res := 1;            --If it returns '1'; then all process got success
       END PROCSS_PROC;                                  --End of the Procedure
    END pkg_name;                                         --End of the Package
    /Please help....
    Thanks..
    Edited by: Linus on Oct 4, 2010 6:07 AM

    Type is declared in the package, therefore to reference it outside the package you must qualify it with package name:
    DECLARE
       l_status      NUMBER(1);
    BEGIN
                SCHEMA_NAME.PKG_NAME.PROCSS_PROC
                      (  3,    --> Days to be purged
                         pkg_name.T_TYPE('TABLE_1','TABLE_2','TABLE_3'),
                      l_status
            DBMS_OUTPUT.PUT_LINE('l_status - '|| l_status);
    END;
    /SY.

  • Getting Wrong number of Arguments as response

    Hi,
    I am just trying run one Process Rtask for RACF called "AdduserToDataSet" which gives a response called Wrong number of Arguments:
    I checked for both Process Task mapping variables and Adapter Varibles and looks like both are same. Not sure what could be the issue?
    2011-05-27 06:04:30,281 INFO (http-0.0.0.0-8080-7) [STDOUT] Target Class = com.identityforge.oracle.integration.IdfUserOperations
    *2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR] java.lang.IllegalArgumentException: wrong number of arguments*
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpADDUSERTODATASET.ADDUSERTODATASETTASK(adpADDUSERTODATASET.java:109)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpADDUSERTODATASET.implementation(adpADDUSERTODATASET.java:58)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
    2011-05-27 06:04:30,281 ERROR (http-0.0.0.0-8080-7) [STDERR]      at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
    2011-05-27 06:04:30

    Can you enable the debug logging level for the connector and retry and then post the output?
    Thanks,
    Kevin

  • Error message: 450 [Wrong number of arguments or invalid property assignment]

    Hello Support,
    I have a vbscript which does some database query. i see from the log that script quits with the below error.
    Error message: 450 [Wrong number of arguments or invalid property assignment]
    but when i execute the same query directly on database, it gives me correct result. also i see that not all the time script quits with this error.
    Does anyone have idea how to troubleshoot it?
    -KAKA-

    i see. i know at which line it fails as error handling is done and will be written in the log.
    sQuery_Prod = "select object_text from sto_ov_externalnode where name = '" & NodeId & "'"
    oRecordSet_Prod.Open sQuery_Prod, oConnection, adOpenStatic, adLockOptimistic
    if err.number <> 0 then
    LogWrite ("Unable to run query")
    LogWrite ("Query: [" & sQuery_Prod & "]")
    LogWrite ("Connection string: [" & sConnect & "]")
    LogWrite ("Error message: " & err.number & " [" & err.description & "]")
    wscript.quit(1)
    end if
    and this piece of code write following in the log.
    07.10.2014 16:55:03:Unable to run query
    07.10.2014 16:55:03:Query: [select object_text from sto_ov_externalnode where name = '{B10255CF-F618-45FB-99BC-31A57D747702}']
    07.10.2014 16:55:03:Connection string: [DSN=Script;DRIVER={SQL Native Client};User ID=xxxxxx;Password=yyyyyy]
    07.10.2014 16:55:03:Error message: 450 [Wrong number of arguments or invalid property assignment]
    Where as i can run query "select object_text from sto_ov_externalnode where name = '{B10255CF-F618-45FB-99BC-31A57D747702}'" successfully directly on database.
    also in the next cycle same query will be successfull within script too.
    Does this help in understanding the problem?
    -KAKA-

  • Wrong number of arguments in call to .....

    Hi All, <br><br> .. I donno what mistake iam performing here.. <br>
    <br><br> There are 141 columns in my procedure .... I have checked and compared each and every parameter datatype with the ones iam setting foor callablestmt and everything is correct ..... but still iam getting error .. Wrong number of arguments call...I am just giving dummy values..
    <br><br>
    int x=0; <br>String s=null;
    for Number Type parameter --- >cstmt.setInt(1,x)<br>
    for Varchar2 Parameter --->cstmt.setString(2,s) <br>
    for Date Parameter --->cstmt.setDate(1,null)<br>
    for inout Parameter --> just setting the string and not giving any registeroutparamter<br>
    for out parameters (iam giving 3 types)<br>
    -->cstmt.registerOutParameter(139,OracleTypes.VARCHAR);<br>
    <br>cstmt.registerOutParameter(134,OracleTypes.DATE);<br> cstmt.registerOutParameter(131,OracleTypes.NUMERIC,0,10);<br>
    <br>
    Iam passing 141 columns in sqlstatement with bind params including out params..<br>
    am I doing this correctly ?<br>When i searched one thread .. on person said that he removed assignments for out paramter annd no need to set for outparmas. <br>I tried that also .. but then it is giving "bind varaibled does not exist"..I donno where ian doing the mistake ... can u please help me?
    <br><br>
    Thanks<br>
    Soujanya

    Soujanya,
    Another thing to consider here is that because you are calling a procedure with such a large number of params and most of them might be defaulted/not set, it would be a better practice to call a wrapper procedure where you can add extra validation on input params before calling the actual procedure and send the required params from OAF as a single record.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Status for listener has wrong number of arguments

    I'm runing the OEM and trying to click on the "Listner Status" button on the right side of the screen when showing the listeners. It returns an error message "NL-00857 wrong number (0-1 needed) of arguments tot status"
    where do I see these arguments?
    thnx
    Endre

    OK, I have made some progress on this. Try opening the file you created in Pages '08 in Preview and saving under a new name. This is what my friend did and it worked. Here is what he said in his email to me:
    +"I opened your file on my MacBook Pro with Preview and then saved again under new name. I could open the file I saved in widows fine but the original file you sent would not open. "+
    Unfortunately, it did not work when I retraced his steps on my Mac. However, it is worth a try, and if it doesn't work on your own Mac, try another one you own or see if it will work on a friend's Mac.

  • Error for wrong number of arguments

    Hi
    I am getting the below error for plsql
    IF (l_src_cd ='P' or l_src_cd = 'E') THEN
    ERROR at line 243:
    ORA-06550: line 243, column 22:
    PLS-00306: wrong number or types of arguments in call to '='
    ORA-06550: line 243, column 9:
    PL/SQL: Statement ignored
    while writing
    IF (l_src ='P' or l_src= 'E') THEN
    l_activity := 'ERS';
    elsif (length(l_adj_cd) > 0) THEN
    l_activity := 'KAM';
    elsif (length(l_offer_cd) > 0 ) THEN
    l_activity := 'RAM';
    elsif (length(l_visit_nbr) > 0 ) THEN
    l_activity := 'SAM';
    ELSE l_activity :='UNK';
    END IF;
    wrong number or type of argument
    Appreciate your help on the above?
    Thanks & Regards

    What is the data type of l_src?
    SQL> declare
      2     type t_tp is table of varchar2(10) index by binary_integer;
      3     l_v t_tp;
      4  begin
      5     l_v(1) := 'A';
      6     l_v(2) := 'B';
      7     if l_v = 'A' or l_v = 'B' then
      8        dbms_output.put_line('True');
      9     else
    10        dbms_output.put_line('False');
    11     end if;
    12* end;
    SQL> /
       if l_v = 'A' or l_v = 'B' then
    ERROR at line 7:
    ORA-06550: line 7, column 11:
    PLS-00306: wrong number or types of arguments in call to '='
    ORA-06550: line 7, column 4:
    PL/SQL: Statement ignoredJohn

  • Failed to open rowset, PLS-00306 Wrong Number of arguments in call to....

    Hi,
      We currently run Crystal Reports v10 with ODBC (CR Oracle ODBC Driver 4.20) to Oracle 9i database (on solaris) and have some reports which gets data (ref cursors) from stored procedures. So far so good and now we are upgrading our oracle database to 10g on Linux server and during my testing these reports give the following error.
    Error Description:
    Failed to open rowset
    Query Engine Error: HY000:[DataDirect][ODBC Oracle driver]ORA-06550:line 1, column 8:
    PLS-00306: wrong number or types of arguments in call to 'MY_STORED_PROCEDURE'
    ORA-06550: line1, column 35:
    PLS-00363: expression 'MY_PARAM_VALUE' cannot be used as an assignment target
    ORA-6550: lin1, column8:
    PL/SQL: Stateme'
    Any help would be greatly appreciated.
    Thanks,
    -Venkat Gopalan

    Discovered on another post that 4.2 is too old. You need to upgrade to a more current ODBC driver that runs on Solaris.
    We have a newer one version 5.3 but it's only for windows. Go to Datadirect.com and see if they have one for that OS.
    Otherwise you'll have to configure your reports to use the native Oracle driver.
    Thank you
    Don

  • 1136: Incorrect number of arguments.  Expected 1

    i got the error in the following code please help me how this happens
    package zoo{
        import flash.utils.setInterval;
        import flash.utils.clearInterval;
        internal class VirtualPet{
            internal var PetName;
            private static var maxNameLength = 20;
            private static var maxCalories = 2000;
            private static var caloriesPerSecond = 100;
            private var digestIntercalID;
            private var CurrentCalories=VirtualPet.maxCalories/2;
            public function VirtualPet(name){
                //object.variableName = "some value";
                this.PetName = name;
                digestIntercalID= setInterval(digest,1000);
            public function eat(foodItems){
                if(CurrentCalories==0){
                    trace (getName() + "is dead you cannot feed it");
                    return;                   
                if (foodItems is Apple){
                    if(foodItems.hasWorm()){
                        trace ("the" + foodItems.getName()+ "had a worm"+ getName() + "cannot eat it");
                        return;
                //object.variableName = value;
                //this.CurrentCalories +=numberOfCalories;
                //setCalories(CurrentCalories + numberOfCalories);
                trace (getName() +"ate " + foodItems.getName());
            setCalories(CurrentCalories + foodItems.getCalories());
            private function digest(){
                trace (getName()+"digested some food");
                setCalories(getCalories() - VirtualPet.caloriesPerSecond);
            public function setCalories(newCurrentCalories){
                if(newCurrentCalories >VirtualPet.maxCalories){
                    CurrentCalories = VirtualPet.maxCalories;       
                }else if (newCurrentCalories <0){
                    CurrentCalories = 0;
            }else {
                CurrentCalories = newCurrentCalories;
            //calculate the amount of calories left   
            var caloriePercentage = Math.floor(getHunger()*100);
            trace (getName()+ "has "+ CurrentCalories + "Calories"+ caloriePercentage +"% of food remeaning" );
            if (caloriePercentage == 0){
                clearInterval(digestIntercalID);
                trace (getName()+"has died you can't feed it");
                return;
            public function getCalories(currentCalories){
                return CurrentCalories;
            public function getHunger(){
                return CurrentCalories / VirtualPet.maxCalories;
            public function setName (newName){
                if(newName.length>VirtualPet.maxNameLength){
                    newName = newName.substr(0,VirtualPet.maxNameLength);
                }else if (newName.length==" "){
                    return;
                PetName = newName;           
            public function getName(){
                return  PetName;

    What Murphy is trying to say is that you're supposed to use an argument within the getCalories function.
    Like this:
    setCalories(getCalories(theMissingArgumentHere) - VirtualPet.caloriesPerSecond);
    This is because when you created your getCalories function you "asked" for an argument:
    public function getCalories() //function expecting 0 arguments
    public function getCalories(currentCalories) //function expecting 1 argument (currentCalories)
    public function anyOtherFunction (num1:int, num2:int, num3:int) //function expecting 3 arguments...and so on.

  • Process is not accessible and wrong number of arguments

    New to SQL and created the following code. Not sure what is wrong...trying to call a procedure/package. Sometimes it tells me the '.' between the package name is invalid.
    Thanks
    Please reply [email protected]
    CREATE OR REPLACE FUNCTION f_call_acct_trans_pkg
    (p_calling_job VARCHAR2,
    p_location VARCHAR2,
    p_pgm_cd VARCHAR2,
    p_bank_code VARCHAR2,
    p_source_cd VARCHAR2,
    p_detail_cd VARCHAR2,
    p_transaction_date DATE,
    p_activity_date DATE,
    p_term_cd VARCHAR2,
    p_in_account_str VARCHAR2)
    RETURN VARCHAR2
    AS
    BEGIN
    DECLARE
    p_out_call_status VARCHAR2(30);
    p_out_account_str VARCHAR2(30);
    v2_acct_unit VARCHAR2(30):= p_out_account_str;
    DZ_GL_ACCT.DZ_GL_ACCT_TRANSLATE
    (p_calling_job,
    p_location,
    p_pgm_cd,
    p_bank_code,
    p_source_cd,
    p_detail_cd,
    p_transaction_date,
    p_activity_date,
    p_term_cd,
    p_in_account_str);
    RETURN v2_acct_unit;
    END;

    CREATE OR REPLACE FUNCTION f_call_acct_trans_pkg
    (p_calling_job VARCHAR2,
    p_location VARCHAR2,
    p_pgm_cd VARCHAR2,
    p_bank_code VARCHAR2,
    p_source_cd VARCHAR2,
    p_detail_cd VARCHAR2,
    p_transaction_date DATE,
    p_activity_date DATE,
    p_term_cd VARCHAR2,
    p_in_account_str VARCHAR2)
    RETURN VARCHAR2
    AS
    p_out_call_status VARCHAR2(30);
    p_out_account_str VARCHAR2(30);
    v2_acct_unit VARCHAR2(30):= p_out_account_str;
    BEGIN
    DZ_GL_ACCT.DZ_GL_ACCT_TRANSLATE
    (p_calling_job,
    p_location,
    p_pgm_cd,
    p_bank_code,
    p_source_cd,
    p_detail_cd,
    p_transaction_date,
    p_activity_date,
    p_term_cd,
    p_in_account_str);
    RETURN v2_acct_unit;
    END;Max
    http://oracleitalia.wordpress.com

  • Ora-06550,pls-00306 wrong number of arguments in call to ||

    declare
    type t_empid is table of empn.empid%type;
    type t_ename is table of empn.ename%type;
    v_empid t_empid;
    v_ename t_ename;
    cursor c1 is select empid,ename from empn;
    begin
    open c1;
    fetch c1 bulk collect into v_empid,v_ename;
    dbms_output.put_line(v_empid||v_ename);
    --end loop;
    close c1;
    end;

    If you do want to benchmark bulk processing versus normal processing - you need to ensure that the tests are identical each time around, except for the part that you want to benchmark.
    So if you're going to benchmark cursor fetching, that becomes a complex problem. How do you ensure that both tests use the same type of I/O? Logical I/O is faster than physical I/O. Flushing the db buffer cache to force physical I/O, does not flush the operating system's file system buffers. And despite Oracle viewing the I/O as physical I/O, it can be logical I/O from the o/s side.
    So cursor fetching is a complex thing to benchmark accurately. And why benchmark that? Bulk processing is about context switching. It is not about cursor fetching or making SQL cursors faster.
    So to simply benchmark context switching, we need to eliminate other factors - such as I/O. The following example uses an empty table (no I/O will result) and attempt to only look at the performance of context switching between the PL/SQL engine and SQL engine.
    SQL> --// the test table - which we keep empty to eliminate any I/O
    SQL> create table footab( id number );
    Table created.
    SQL> --// the collection data type the test will be using
    SQL> create or replace type TNumbers is table of number;
      2  /
    Type created.
    SQL> --// the test: bulk processing and then "normal" processing
    SQL> declare
      2          numArray        TNumbers;
      3          t1              number;
      4  begin
      5          numArray := new TNumbers();
      6          numArray.Extend(10000);
      7          for i in 1..numArray.Count
      8          loop
      9                  numArray(i) := i;
    10          end loop;
    11 
    12          t1 := dbms_utility.get_cpu_time;
    13          forall i in 1..numArray.Count
    14                  delete from footab where id = numArray(i);
    15          t1 := (dbms_utility.get_cpu_time - t1)/100;
    16          dbms_output.put_line( 'forall='||t1||' sec(s)' );
    17 
    18          t1 := dbms_utility.get_cpu_time;
    19          for i in 1..numArray.Count
    20          loop
    21                  delete from footab where id = numArray(i);
    22          end loop;
    23          t1 := (dbms_utility.get_cpu_time - t1)/100;
    24          dbms_output.put_line( 'for='||t1||' sec(s)' );
    25  end;
    26  /
    forall=.06 sec(s)
    for=.26 sec(s)
    PL/SQL procedure successfully completed.
    SQL> So, from this test, one can see that a reduction of context switches improve performance. Nothing more.
    The actual benefit in real life processing depends on a number of factors. And many of these will be unique at run-time. So one can say that reducing context switching is better. How much better will be pure speculation as test results like these cannot be applied via a formula of sorts to determine production performance.

  • Wrong number of arguments for a setcolor operator

    Does anyone know what the above message means? I saved a pages document as a .pdf file and when the person I emailed it to tried to open it he got the above message.
    He has been able to open previous files I have sent.

    OK, I have made some progress on this. Try opening the file you created in Pages '08 in Preview and saving under a new name. This is what my friend did and it worked. Here is what he said in his email to me:
    +"I opened your file on my MacBook Pro with Preview and then saved again under new name. I could open the file I saved in widows fine but the original file you sent would not open. "+
    Unfortunately, it did not work when I retraced his steps on my Mac. However, it is worth a try, and if it doesn't work on your own Mac, try another one you own or see if it will work on a friend's Mac.

Maybe you are looking for

  • How do I access an older AX in a newer vesion of the Airport Utility?

    I have had an AX network for over 3 years and have had no problems with it. I just bought a new one to add to my network and I am having all kinds of problems now. Airport utility recognizes both units, but will not allow me to access the older one.

  • Why i can not update or download any apps from app store from my iphone?

    can somebody help me why i cannot download any apps from app store and my 3G and wifi is available also in my phone.

  • Search for images using Keywords Problem.

    1) In LR4, Search for images using Keywords (click on arrow next to Keyword). 2) Select image, export to PS6, save as Tif. 3) Tif retains all Keywords when it appears in LR 4) Despite that, image does not show up in the same 'Search for images using

  • How can i get MovieClip RemoveChild or not

    In stage button, MovieClip is there. When i click button remove the Movieclip. first time no errors. but next  given below error. Ithink allready movieclip is removed from stage so how can i write code.  And i also  mentioned my code . TypeError: Err

  • LDAP authentification JAAS Module ?

    Hello We have installed a SAP Portal (EP7), using an R/3 data source for users. However, we would like to use a LDAP for authentification. The module should check login / password against the LDAP, check that the user exist in the UME, and then allow