CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

View Poll Results: will you help

Voters
2. You may not vote on this poll
  • yes i will (goblom10 thanks you)

    0 0%
  • No i will not (goblom10 doens't like you)

    2 100.00%
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Posts
    1

    Question HELP (identifier) expected

    cmd is always giving me an error saying
    jui.java:719: <identifier> exected
    new Xml.("findcatchedir() + "Files/all_IDs/Items.xml");
    jui.java:722: <identifier> exected
    new Xml.("Files/all_IDs/Items.xml");
    jui.java:730: <identifier> exected
    new Xml.("findcatchedir() + "Files/all_IDs/NPCs.xml");
    jui.java:733: <identifier> exected
    new Xml.("Files/all_IDs/NPCs.xml");
    jui.java:741: <identifier> exected
    new Xml.("findcatchedir() + "Files/all_IDs/NewItems.xml");
    jui.java:744: <identifier> exected
    new Xml.("Files/all_IDs/NewItems.xml");
    jui.java:752: <identifier> exected
    new Xml.("findcatchedir() + "Files/all_IDs/Objects.xml");
    jui.java:755: <identifier> exected
    new Xml.("Files/all_IDs/Objects.xml");
    8 errors
    I dont get it what am i doing wrong? ive checked over it numerous times and nothing seems to be wrong
    if you need the files they are located at http://uppit.com/v/CQ48XCRM they were to big to upload to site (6.5 megabytes)
    the complete code is at http://www.moparscape.org/smf/index....,414162.0.html
    here is the code and file i am using

    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.Robot;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.awt.event.WindowListener;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.PrintStream;
    import java.net.InetAddress;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.sound.midi.InvalidMidiDataException;
    import javax.sound.midi.MidiSystem;
    import javax.sound.midi.MidiUnavailableException;
    import javax.sound.midi.Sequencer;
    import javax.swing.JDialog;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JMenuBar;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JPopupMenu;
    import javax.swing.UIManager;
    import javax.swing.filechooser.FileFilter;
    import sign.signlink;

    public class Gui extends client
    implements ActionListener, ItemListener, WindowListener
    {
    private static FileOutputStream logFileOut;
    private static boolean isApplet = false;
    private MP3Player player;
    public int midiCount;
    public Sequencer sequencer;
    public static String detail = null;
    int world = 1;
    public static String loop = null;
    public static String settalk = null;
    public static String setchateffects = null;
    public static String setname = null;
    public static String setchat = null;
    public JFrame frame;
    public String Serverip;
    public static double version = 6.2D;


    if (str1.equals("Item IDs"))
    {
    if (isApplet)
    {
    checkIDs();
    new Xml.(findcachedir() + "Files/all_IDs/Items.xml");
    }
    else {
    new Xml.("Files/all_IDs/Items.xml");
    }
    }
    if (str1.equals("NPC IDs"))
    {
    if (isApplet)
    {
    checkIDs();
    new Xml.(findcachedir() + "Files/all_IDs/NPCs.xml");
    }
    else {
    new Xml.("Files/all_IDs/NPCs.xml");
    }
    }
    if (str1.equals("New Item IDs"))
    {
    if (isApplet)
    {
    checkIDs();
    new Xml.(findcachedir() + "Files/all_IDs/NewItems.xml");
    }
    else {
    new Xml.("/Files//all_IDs/NewItems.xml");
    }
    }
    if (str1.equals("Object IDs"))
    {
    if (isApplet)
    {
    checkIDs();
    new Xml.(findcachedir() + "Files/all_IDs/Objects.xml");
    }
    else {
    new Xml.("Files/all_IDs/Objects.xml");
    }
    }
    }

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: HELP (identifier) expected

    When posting:
    1. don't create a Poll unless you're doing a survey
    2. always wrap code in code tags

    Your problem is where you are creating an new XML object you have a '.' after XML and before the parameter list ie:

    Code:
    new Xml.("Files/all_IDs/NPCs.xml");
    should be
    Code:
    new Xml("Files/all_IDs/NPCs.xml");

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured