I’m having trouble running this through a java compiler.
What seems to be wrong with it?
The error that’s showing is from this:
error: cannot find symbol
int damageTaken = rand.nextInt(EnemyAttackDamage);
symbol: variable EnemyAttackDamage
location: class Main
import java.util.Random;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//System objects
Scanner in = new Scanner(System.in);
Random rand = new Random();
//Game Variables
String[] enemies = { “Gargoyle”, “Ghoul”, “Barbarian”, “Hobgoblin”};
int maxEnemyHealth = 100;
int maxEnemyAttackDamage = 35;
//Player Variables
int health = 150;
int attackDamage = 45;
int numHealthPotions = 5;
int healthPotionHealAmount = 25;
int healthPotionDropChance = 55; //Percentage of drop
boolean running = true;
System.out.println(“Welcome to the Karamja Dungeon!”);
GAME:
while(running) {
System.out.println(“—————————————————-“);
int enemyHealth = rand.nextInt(maxEnemyHealth);
String enemy = enemies[rand.nextInt(enemies.length)];
System.out.println(“t# ” + enemy
PayPal Gateway not configured
PayPal Gateway not configured