ok, i don't know anything of java and somehow managed to DL NetBeans the sun program that creates Java apps... apprently.. (wasn't what i intended to DL but hey :mrgreen: )

A friend wants a card game made, so i searched these forums and found http://www.daniweb.com/techtalkforums/showthread.php?t=68640&highlight=card+game

i took the coding and edits from there and put it into NetBeans and kep coming back with the following errors:

Compiling 3 source files to C:\Documents and Settings\kim\card\build\classes
C:\Documents and Settings\kim\card\src\card\driver.java:24: 'class' or 'interface' expected
package class card;
C:\Documents and Settings\kim\card\src\card\driver.java:24: '{' expected
package class card;
C:\Documents and Settings\kim\card\src\card\driver.java:79: '}' expected
3 errors


at first there were about 20 errors these are the line it says is wrong:

package class card;

I added a { } where it says to, so what does "class" or "interface" expected mean? i see a class...


and if anyone has any other ideas for how to create a card game, in another language or better software i'm all ears :cheesy:

where do i look for it? i got the three files that are in the thread i linked to.. if i take that line out there's way more errors

The chances are, I can't say for sure cos that link you posted is dead, "package class card" is some third party library or class needed to run the driver class.

It may just contain a program which displays the pictures in the deck.

You might be able to download it, but I wouldn't count on it. In short without it, your current program is as good as dead.

ok, thanks. sorry for the dead link, didn't realise. specially as i was using it about 2 hours ago

http://www.daniweb.com/techtalkforums/showthread.php?t=68640&highlight=card+game

odd 'cause it works when i copy and paste. but anywho, told ya i didn't know what i was doing :)

where would you advise starting for making a card game? i know C, HTML, XML, (the realitvly easy ones, and am reading up on using Visual Basic Express 05). but want to branch out anyway, so what language would be suitable for that sort of thing?

package class card;

I'm sorry, but don't you see anything wrong with this line? Both package and class are reserved words of a type that can't be used together, so it is more than passing strange to see them one after the other for one. For another I don't believe you can have a space in a package name (call me an idiot, but .....). For another, since class is a reserved word, you can't use that as a package name anyway. This line should probably be either be

package card;

or (and I think this more likely)

public class Card {

And in fact, in the first of those files (Card.java) in the thread you mentioned, that is exactly the way it is, except the { is on the next line, rather than on the current line.

I'm sorry, but don't you see anything wrong with this line?

Told ya i didn't know anything of java.. and i have no idea how it changed then *shruggs* but thanks anyway.

and oi wee i heard that ;)

This article has been dead for over six months. Start a new discussion instead.