Need some help on a game im making

Making a game called Beetle however i got stuck when trying to display the players name in the main method. As you will see the variable playerName is supposed to be returned by beetleGameIntro method but i dont think it is because when i run it the dialog box is blank...also i played with the initializing of that variable and found out that if i take away the blank quotes and make it public static the dailog box shows "null" but i want to know why its not displaying the name entered.
public static void main(String[] args)
        boolean playAgain=false;
        boolean hasHead=false;
        boolean hasBody=false;
        boolean hasTail=false;
        boolean hasFeelers=false;
        boolean hasEyes=false;
        boolean hasLegs=false;
        int feelerCount=0;
        int eyeCount=0;
        int legCount=0;
        String playerName="";
        beetleGameIntro(playerName);
        JOptionPane.showMessageDialog(null, playerName);
        while(playAgain=true)
        System.exit(0);
    } // end main
public static String beetleGameIntro(String playerName)
        boolean seeRules;
        playerName=JOptionPane.showInputDialog("Welcome to the Beetle Game! "+
                                               "\n \n What is your name? ");
        seeRules=yes("HELLO "+playerName+".\n\n Would you like to see the rules (Y/N)?");
        if(seeRules)
            displayRules();
        return playerName;
    } // end method beetleGameIntro

When you call the method beetleGameIntro from your main method, what happens is that the contents of playerInfo in the main method (" ") is copied to the variable playerInfo in the scope of the beetleGameIntro. The variable in the beetleGameIntro is not the same as the variable in the main method. The following code does exactly what your code does right now, and might clear things up, but not fix your problem. You should try to fix it yourself so that you won't run into the same problem again :)
public static void main(String[] args)
        boolean playAgain=false;
        boolean hasHead=false;
        boolean hasBody=false;
        boolean hasTail=false;
        boolean hasFeelers=false;
        boolean hasEyes=false;
        boolean hasLegs=false;
        int feelerCount=0;
        int eyeCount=0;
        int legCount=0;
        String playerName="";
        beetleGameIntro(playerName);
        JOptionPane.showMessageDialog(null, playerName);
        while(playAgain=true)
        System.exit(0);
    } // end main
public static String beetleGameIntro(String unusedVariable)
        boolean seeRules;
        String playerName=JOptionPane.showInputDialog("Welcome to the Beetle Game! "+
                                               "\n \n What is your name? ");
        seeRules=yes("HELLO "+playerName+".\n\n Would you like to see the rules (Y/N)?");
        if(seeRules)
            displayRules();
        return playerName;
    } // end method beetleGameIntroI think you don't even want to pass a variable to the beetleGameInfo method, only store the result of the call in a variable in the scope of the main method:
String playername = beetleGameIntro(); // this goes in the main method

Similar Messages

  • Need some help building a game for a school project

    I have to build a game called quads.
    My java knowledge is not the best there is, so i'm looking for some existing code i could use for my game.
    Here are some game details.
    - The game is played by 2 players (on the same computer).
    - both players have 18 square stones.
    - the stones are divided in 4 sides,
    - each side can be shaped, with horizontal- or vertical lines, gray, or black
    - http://213.73.158.54/plaatjes/stones.htm for some preview images
    - player1 has only gray stones, player2 only black.
    - both players have 1 white stone, wich they have to use first.
    - the game is over when one of the players can no longer place one of his stones on the board.
    What i'm looking for,
    I'm looking for a source of a similar game, with:
    - a mouse listener, with te option te rotate the selected stone (0, 90, 180, 270), and to move the selected stone.
    - enable/disable stone collections. (take turns)
    PS. if you don't know where i can find a source similar to this game, sites with game souces are also welcome.
    Thanks alot :D

    Ok, here's what i already have.
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class quadsapplet extends Applet
    //declaraties voor stenen
    private Steen Steen1;
         private Steen[] steentjesSpeler1;
    private Steen[] steentjesSpeler2;
    private Steen[] speelBord;
         private static Image achtergrond;
         private String plaatje;
         private int vak1, vak2, vak3, vak4, x, y, xBord, yBord;
    public TextField tekstvak1;
    public TextField tekstvak2;
    public TextField tekstvak3;
    public Button knop;
    public Button knop1;
    //declaraties voor bord
    private Bord bord;
         public void init()
    tekstvak1 = new TextField();
    tekstvak1.setBounds(10, 550, 70,30);
    add (tekstvak1);
    tekstvak2 = new TextField();
    tekstvak2.setBounds(300, 550, 70,30);
    add (tekstvak2);
    tekstvak3 = new TextField();
    tekstvak3.setBounds(700, 550, 70,30);
    add (tekstvak3);
    knop = new Button("Verplaats grijs");
    knop.setBounds(150, 550, 100,30);
    knop.addActionListener(new KnopHandler() );
    add (knop);
    knop1 = new Button("Verplaats zwart");
    knop1.setBounds(450, 550, 100,30);
    knop1.addActionListener(new Knop1Handler() );
    add (knop1);
    setBackground(new Color(150, 156, 223 ));
              steentjesSpeler1 = new Steen[18];
    steentjesSpeler2 = new Steen[18];
    speelBord = new Steen[36];
              vak1 = 1;
              vak2 = 1;
              vak3 = 1;
              vak4 = 1;
              xBord = 200;
    yBord =10;
    x = 20;
    // bord
    //stenen speler 1
              for(int i=0 ; i<18 ; i++)
                   steentjesSpeler1[i] = new Steen(Color.black, x, y, vak1, vak2, vak3, vak4, false, "3");
    steentjesSpeler1.setArrX(i);
                   add(steentjesSpeler1[i]);
                   System.out.println("Steen "+(i+1)+" created!" );
                   plaatje = "./images/g"+(i+1)+".jpg";
                   achtergrond = getImage( getDocumentBase(), plaatje );
                   System.out.println(plaatje );
                   steentjesSpeler1[i].setafbeelding( achtergrond );
                   x += 70;
                   if(x>99)
                        x = 20;
                        y += 60;
    //stenen speler 2
    for(int i=0 ; i<18 ; i++)
                   steentjesSpeler2[i] = new Steen(Color.black, x + 630 , y - 540, vak1, vak2, vak3, vak4, false, "3");
                   add(steentjesSpeler2[i]);
                   System.out.println("Steen "+(i+1)+" created!" );
                   plaatje = "./images/z"+(i+1)+".jpg";
                   achtergrond = getImage( getDocumentBase(), plaatje );
    System.out.println(plaatje );
    steentjesSpeler2[i].setafbeelding( achtergrond );
                   x += 70;
                   if(x>99)
                        x = 20;
                        y += 60;
    for(int i=0 ; i<36 ; i++)
                   speelBord[i] = new Steen(Color.black, xBord, yBord, vak1, vak2, vak3, vak4, false, "3");
    speelBord[i].setArrX(i);
    //speelBord[1] = new Steen(Color.black, xBord, yBord, 1,1,1,1, false, "3");
    add(speelBord[i]);
    System.out.println("Steen "+(i+1)+" created!" );
                   plaatje = "./images/"+(i+1)+".jpg";
                   achtergrond = getImage( getDocumentBase(), plaatje );
                   System.out.println(plaatje );
                   speelBord[i].setafbeelding( achtergrond );
                   xBord += 70;
                   if(xBord>550)
                        xBord = 200;
                        yBord += 70;
              setLayout( null );
    } // eind init()
    class KnopHandler implements ActionListener
    public void actionPerformed ( ActionEvent e)
    String invoer1 = tekstvak1.getText();
    int getal1 = -1;
    getal1 = Integer.parseInt( invoer1 );
    String invoerstring2 = tekstvak2.getText();
    int getal2 = -1;
    getal2 = Integer.parseInt( invoerstring2 ) ;
    speelBord[getal2].afbeelding = steentjesSpeler1[getal1].afbeelding;
    tekstvak2.setText("");
    tekstvak1.setText("");
    for (int teller = 0; teller<36; teller++){
    speelBord[teller].repaint();
    getal1 = -1;
    getal2 = -1;
    class Knop1Handler implements ActionListener
    public void actionPerformed ( ActionEvent e)
    String invoer3 = tekstvak3.getText();
    int getal11 = -1;
    getal11 = Integer.parseInt( invoer3 );
    String invoerstring22 = tekstvak2.getText();
    int getal22 = -1;
    getal22 = Integer.parseInt( invoerstring22 ) ;
    speelBord[getal11].afbeelding = steentjesSpeler2[getal22].afbeelding;
    tekstvak2.setText("");
    tekstvak3.setText("");
    for (int teller = 0; teller<36; teller++){
    speelBord[teller].repaint();
    getal11 = -1;
    getal22 = -1;
    //tekenen van het bord
    /*public void paint( Graphics g )
    //bord.tekenBord( g, 172, 20);
    //g.drawString(Bord.bord[0][0]);
    My problems right now are,
    - i can't select more than 1 stone
    - i can't rotate 1 stone (i did rotate them all, but that's a bit useless)
    - i can't make players to take turns.
    - i can't move stones, i can only copy them...
    So if i can't use source codes, does anyone know a tutorial for all this?
    PS. sorry about the dutch code.

  • Need some help in creating Search Help for standard screen/field

    I need some help in adding a search-help to a standard screen-field.
    Transaction Code - PP01,
    Plan Version - Current Plan (PLVAR = '01'),
    Object Type - Position ( OTYPE = 'S'),
    Click on Infotype Name - Object ( Infotype 1000) and Create.
    I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
    I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
    I specify again, I have to add a new search help to standard screen/field and not to enhance it.
    This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
    There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
    It's urgent.
    Thanks in advace. Suitable answers will be rewarded

    Hi Pradeep,
    Please have a look into the below site which might be useful
    Enhancing a Standard Search Help
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
    edc983384237
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
    If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
    timepoints
    The following timepoints are defined:
    1. SELONE
    Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
    Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
    The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
    2. PRESEL1
    After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
    3. PRESEL
    Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
    4. SELECT
    Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
    5. DISP
    Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
    6. RETURN (usually as return value for the next timepoint)
    The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
    It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
    7. RETTOP
    You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
    8. EXIT (only for return as next timepoint)
    The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
    9. CREATE
    The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
    The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
    10. APP1, APP2, APP3
    If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
    Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
    If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
    F4IF_SHLP_EXIT_EXAMPLE
    This module has been created as an example for the interface and design of Search help exits in Search help.
    All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
    A search help exit is called repeatedly in connection with several
    events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
    However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
    Hope this info will help you.
    ***Reward points if found useful
    Regards,
    Naresh

  • Need some help with: implement email notification on note board within a page layout (javascript)

    Dear all,
    I have a quite specific issue in which I'm in need of some guidance and help!
    Within our SharePoint I have created a custom page layout. This is a simple page to post some content (news) and a standard Note Board is implemented.
    Every time a news item is placed, this is done by our communication departement, this page with standard layout is placed as a page in a page library. When there are no comments on that particular item/subject I found a solution to replace the standard SharePoint_no_posts-text
    by placing a contenteditor web part in the Page Layout with a reference to a textfile with some javascript in it. This works perfectely.
    The only thing left is that I want to automatically send an email to the contact (which is defined when making the news item) everytime someone posts a new comment. Here is where I need some help!
    We don't really use mysites so I was wondering if someone could tell how I could do this by for example some code (javascript) which I can implement in the Page Layout.
    Can anyone help me?
    Thanks in advance,
    Gr Matt

    Try below code:
    function sendMail() {
    var link = 'mailto:?subject=insert subject line&body=';
    var curntLoc=window.location.href;
    link +=escape(curntLoc);
    window.location.href = link;
    // window.location.href = link;
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/9cfe7884-fc9e-4c7c-a44c-f740d2edcafc/sending-email-using-javascript-in-sharepoint-2010
    Also check below:
    http://spjsblog.com/2010/06/16/send-email-with-javascript-with-the-help-of-a-workflow-in-a-dedicated-send-email-list/

  • Need some help with Calendar on my iPhone.

    Ok folks. Need some help and it may be basic, but I'm struggling with it.
    My wife and I both have iphone 5's. Both phones share one iCloud Id and one Apple ID.
    So, how do we share information across the apple calendar app?
    If I add something to my cal. It does not go to her. How can we get them to sync?
    Please help!!!
    Thank You!!

    Two things to check by putting the two iOS devices side-by-side.  First, check in Settings > iCloud to assure that you are indeed both using the same iCloud login.  Also, check that calendar is toggled on.
    Then, check Settings > "Mail, Contacts, and Calendars".  Scroll down to the calendars section and assure that your iCloud calendar is set as the "Default Calendar".
    Then, check that Settings > "Mail, Contacts, and Calendars" > "Fetch new data" is set to something suitable.  Note that "Push" will be best for iCloud.
    Lastly, open Calendars app, touch "Calendars" at the bottom, and assure that iCloud calendar is checked so it is visible.
    Then give you calendars a try again making sure that you are posting calendar events in the iCloud calendar.
    Hope this helps.

  • Need some help with sound quality

    Hi guys, new here. I'm working on creating an album on my own. Bass and vocals are real, everything else is using software instruments. I have about 8 songs done, but the problem is I don't really know what I'm doing as far as recording and levels go.
    I'm using studio headphones and everything sounds fantastic through them, and even pretty good if I just hook up some earbuds, but when I bounce out a track and burn them to do a disc and play it in my car, it sounds awful. Suddenly the guitar is too low, drums are too loud.
    I really need some help here. I'm even willing to pay someone to get me on the right track. Using paypal or whatever.

    AecDuck wrote:
    Where's the fun in that? Maybe you have different motives, but I got into home recording because I like doing things myself, even if I have to learn the hard way. If you know enough to get good bass and vocal recordings and mix that with virtual instruments, then you are well on your way to making a decent sounding mix. Mixing in headphones can be very deceiving. Things simply sound different in headphones. You need some monitors, even if they are crappy because if you can get it to sound good in crappy monitors it will likely sound good on other speakers.
    The fun and experience comes from getting a good balance that sounds good in headphones, and in the monitors, and in your home stereo, and in your car stereo. Use the different audio systems as a reference. If the drums are too quiet in the car, bring them up a bit. If the bass is too loud in your headphones, put them down a bit.
    If you bring in your recordings to be mixed by somebody else, first of all you're going to end up paying hundreds, if not $1000+ dollars, even in a sub-par studio. Secondly, it's never going to sound how you want it to sound. It's going to sound how THEY want it to sound.
    I know it takes longer, and it's hard work, but you will have such a tremendous amount of satisfaction when your project is done knowing that YOU recording it, and YOU mixed it on YOUR equipment. It will be 100% yours.
    Where's the fun? How about the fun in interacting with another human being? How about the satisfaction in having another validate what you've been trying to produce?
    I don't think it's helpful to make generalizations about what type of experience the OP might have in getting professional help. I have had good experiences working with mixing engineers, and perhaps I have just been lucky, but I've been able to produce music that sounded how I wanted it to sound, but at a level beyond which my skill at the time would have been able to produce, AND I gained some insights to help me in the future.
    It IS satisfying to teach yourself a new skill. And it takes a lot of patience, trial and error, and you might miss the mark more often than you hit it. If you're in a rush, it might be a viable solution to contact some studios and see if you can work with them. Learning from others is perfectly acceptable.

  • I Need Some Help With My Dreamweaver

    Hello, there i need some help with my dreamweaver i already made a forum about this but that one i maded didnt make sense soo i will make it more details in it soo i will tell you what i did i tell you what i downloed and all that just now but i tell you the things what it does i downloaded Adobe Design and Web Premium CS6 its a 30 day trial then and now i will tell you the details look below please
    Details
    Soo i opened my start menu then went on all programs then clicked on Adobe Design and Web Premium CS6 then i clicked on the dreamweaver CS6 then when i clicked on it i heard my computer shut down then it shuted down when i opened it straight away then it turns it self back on
    What did i do about this when it happened?
    I made a question so please can telll me what to do or what ever
    Why did i download it?
    i downloaded it because i am making a website and i want to use dreamweaver CS6 because i use notepad++ i do not like the notepad++ its harder and dreamweaver helps a bit i think because i watched a video of it
    What if you dont have an answer?
    Well, i will be very angry because i am making a good website its gonna be my frist publish website ever i made 20 websites but i never published them i deleted them because i wiped my computer
    What kind of Computer Do You have?
    System:
    Micfosoft windows xp
    Media Center Edition
    Version 2002
    Service Pack 2
    Computer
    ei-system
            intel(R)
    pentium(R) 4 CPU 3.20ghz
    3.20 ghz, 960 MB of RAM
    Btw i am using dreamweaver CS6 if you fogot and dont say add more details because there is alot off details there and if you help me i will show u the whloe code when i am done but leave ur emaill address below
    (C) Connor McIntosh

    No.
    Service Pack 3 just updates your OS. All of your files, folders and programs will still be there.
    You will start running into more problems like this the longer you stick with XP though. That particular OS is over 11 years old, service pack 3 hs been out for over 4 years.
    It may be time for a system upgrade. I personally went from XP to Windows 7 and I haven't looked back one bit.

  • Remote App on iPad connects but drops after about  20 mins. Need to turn  off wait about 1 minute then turn on wifi on iMac before it can reconnect. Need some help please.

    Remote App on iPad connects but drops after about  20 mins. Need to turn  off wait about 1 minute, then turn on wifi on iMac before it can reconnect. Need some help please.
    Already gone through troubleshooting guide a zillion times. Thanks.

    This worked for me... A little time consuming but once you get rolling it goes GREAT... Thanks....
    I got my artwork and saved it to my Desktop
    Opened up Microsoft Paint and clicked on "File" and "Open" and found it to get it on the screen to resize it
    Clicked "resize" and a box for changing it opened up
    Checked the box "Pixels" and "Unchecked maintain aspect ratio"
    Set Horizontal for 640 and Vertical for 480
    Clicked on "OK" and went back to "File" and did a "Save As" and chose JPEG Picture
    It came up "File Already Existed" and clicked "OK" (really did not care about the original artwork I found because wrong size)
    Went to iTunes and on the movie right clicked on "Get Info", clicked on "Details", then "Artwork"
    Go to the little box on the top left that shows your old artwork and click on it to get the little blue border to appear around it and hit "Delete" to make it gone
    Click on "Add Artwork" and find it where you put the one from above on your Desktop and hit "Open" and OK and your new artwork is now there and all good.
    Sounds like a lot of steps to follow but after around 5 or so you will fly through it. This worked perfect on my iPhone 6 Plus and I have artwork on my Home Videos now.

  • TS1702 I need some help the apps were downloading slowly

    The apps downloaded but it didn't cause it's stuck in downloading mode what should I do?
    The iOS 6 update didn't work.
    Please I need some help.
    The apps didn't download.
    Talking Angela and Ginger didn't download.
    Talking Santa didn't update.

    Try moving the existing backup file to a safe location so that iTunes has to create an entire new file.  The backup file is located here. You can delete that backup once you get a successfull backup.
    iTunes places the backup files in the following places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: If you do not see the AppData or Application Data folders, you may need to show hidden files (Windows XP,  Windows Vista and Windows 7), or iTunes may not be installed in the default location. Show hidden files and then search the hard drive for the Backup directory.

  • Need some help: my itunes won't sync with my iphone anymore. Both softwares are up to date and I've reinstalled itunes. After I reinstall, it syncs. But then when I reboot my computer, it no longer syncs anymore and I have to keep reinstalling itunes. Tho

    Need some help: my itunes won't sync with my iphone anymore. Both softwares are up to date and I've reinstalled itunes. After I reinstall, it syncs. But then when I reboot my computer, it no longer syncs anymore and I have to keep reinstalling itunes. Thoughts???

    thought that it was possible to have the same iTunes library on any machine that was authorised, a kind of cloud-iTunes I guess. 
    That would convenient, but sadly it is not the case. Sorry!
    Either way your welcome and best of luck!
    B-rock

  • Need some help in debugging this exported script

    Below is DDL generated by visio forward engineering tool . The example below consists of 2 test tables with one foreign key.
    Forward engineering generated DDL script
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table1]') AND type in (N'U'))
    DROP TABLE [dbo].[Table1]
    GO
    CREATE TABLE [dbo].[Table1] (
    [test] CHAR(10) NOT NULL
    , [test2] CHAR(10) NULL
    GO
    ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [Table1_PK] PRIMARY KEY CLUSTERED (
    [test]
    GO
    GO
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table2]') AND type in (N'U'))
    DROP TABLE [dbo].[Table2]
    GO
    CREATE TABLE [dbo].[Table2] (
    [test2] CHAR(10) NOT NULL
    GO
    ALTER TABLE [dbo].[Table2] ADD CONSTRAINT [Table2_PK] PRIMARY KEY CLUSTERED (
    [test2]
    GO
    GO
    ALTER TABLE [dbo].[Table1] WITH CHECK ADD CONSTRAINT [Table2_Table1_FK1] FOREIGN KEY (
    [test2]
    REFERENCES [dbo].[Table2] (
    [test2]
    GO
    GO
    When i converted this DDL script using scratch editor the migration tool gave some errors can anyone help me to resolve below
    DECLARE
    v_temp NUMBER(1, 0) := 0;
    BEGIN
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT *
    FROM objects
    WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table1]')*/
    AND TYPE IN ( N'U' )
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    TRUNCATE TABLE Table1;
    END IF;
    END;
    CREATE TABLE Table1
    test CHAR(10) NOT NULL,
    test2 CHAR(10)
    ALTER TABLE Table1
    ADD
    CONSTRAINT Table1_PK PRIMARY KEY( test );
    --SQLDEV:Following Line Not Recognized
    DECLARE
    v_temp NUMBER(1, 0) := 0;
    BEGIN
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT *
    FROM objects
    WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table2]')*/
    AND TYPE IN ( N'U' )
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    TRUNCATE TABLE Table2;
    END IF;
    END;
    CREATE TABLE Table2
    test2 CHAR(10) NOT NULL
    ALTER TABLE Table2
    ADD
    CONSTRAINT Table2_PK PRIMARY KEY( test2 );
    --SQLDEV:Following Line Not Recognized
    ALTER TABLE Table1
    ADD
    CONSTRAINT Table2_Table1_FK1 FOREIGN KEY( test2 ) REFERENCES Table2 (test2)
    --SQLDEV:Following Line Not Recognized
    ;

    Pl do not post duplicates - Need some help in debugging this script

  • Need some help in Los Angeles

    working on a music video that needs some help. I own Final Cut and Color. Done the edit and it looks great but it needs help polishing and I have no idea what to do. Planning on showing the video this friday night in hollywood and I want it to blow people away. Is there anyone in the area would be willing to help? Please contact me ASAP. Thanks Ray

    if you can give me a call that would be best, I can tell you what I need to accomplish. Thanks
    818 935 5079

  • Need some help in ARCHITECTURE level for upgrading SAP BW 3.5 to SAP BI 7.0

    HI all,
    I am a consultant in a small company, i am curently handling upgradation project i need some help in ARCHITECTURING this complete project, please share me your knowledge, like process flows what information i need to get from clients before starting the project, what is pre upgradation checks, post upgradation cheks  ...............
    Thanks in advance.............

    Hi,
    You need to confirm the downtime during the upgrade activity.
    Check for Space and resource allocation.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8d1a0a3a-0b01-0010-eb82-99c4584c6db3
    https://wiki.sdn.sap.com/wiki/display/BI/UpgradefromBW3.XtoBI7.0+%28SP13%29
    https://wiki.sdn.sap.com/wiki/display/BI/Migrationof3.xobjectstoBI7.0
    You need to make sure some OSS notes should be applied, check the below link for the same:
    https://wiki.sdn.sap.com/wiki/display/BI/UpgradetoNetWeaverBI7.0%28SAPNotes+%29
    http://wiki.sdn.sap.com/wiki/display/BI/BIUpgradation-HelpfulOSSnotesfromEDWperspective
    Hope this helps...
    Rgs,
    Ravikanth.

  • Need Some help in Developing an ALV report ..Plz help me

    Hi Experts I am basic learner to ABAP Here I need some help in developing a Delivery *** Invoice Report....Please help me by spending a little time..
    Tables are VBAK VBAP LIPS LIKP   and Document floe table is VBFA
      SELECT VBELN VKORG VTWEG SPART
        FROM VBAK
        INTO TABLE I_VBAK
        WHERE VBELN IN S_VBELN.
      IF I_VBAK IS NOT INITIAL .
        SELECT VBELN POSNR MATKL POSAR WERKS
          FROM VBAP
          INTO TABLE I_VBAP
          FOR ALL ENTRIES IN I_VBAK
          WHERE VBELN = I_VBAK-VBELN.
      ENDIF.
      IF I_VBAP IS NOT INITIAL.
        SELECT * FROM LIPS
          INTO CORRESPONDING FIELDS OF TABLE I_LIPS
          WHERE VGBEL = VBAP-VBELN
          AND VGPOS = VBAP-POSNR.
      ENDIF.
      IF I_LIPS IS NOT INITIAL.
        SELECT VBELN VSTEL VKORG KUNNR
        FROM LIKP
        INTO TABLE I_LIKP.
      ENDIF.
    Moderator message : Outsourcing is not allowed, don't expect others to correct your source code. Thread locked.
    Edited by: Vinod Kumar on Aug 1, 2011 5:43 PM

    hi ,
      Look in this link
      <a href="http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/content.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm</a>
    Regards
    Renjith Kumar

  • Need some help in saving video message from viber to my Iphone. I disabled the thing that would save photos and videos automatically then, there comes a video I want to save. After loading and watching it, I press the "save to gallery"

    Need some help in saving video message from viber to my Iphone 5S with new ios 8's program . I disabled the thing that would save photos and videos automatically then, there comes a video I want to save. After loading and watching it, I press the "save to gallery" thing but it doesn't save in gallery. I tried all, restarting my phone, rebooting then turning on the save automatically thing and when I watch it again, it still wouldn't save.

    Probably a good question to ask Viber or look at their support site.

Maybe you are looking for