October 13th, 2011, 09:43 PM
What is WRONG with this code?
I've been working on the source code for an RPG game. This class I have here is the MainWorld class, a class designated to control movement in the game. So far, I've gone from about 70 to 13 compile errors. A few of them are syntax errors. The main ones are telling me that my type or namespace names are not found, even though I imported them into my code.
I'm also getting a message telling me I can't convert from int to string with my random functions. What's the fix for this?
I also have the full source code if you want to see the other classes.
DataHandler data = new DataHandler();
public void Mainworld(Hero hero, List<Character> monsters)
You are in a valley, not far from the town of Zalgalax.
Where do you wish to travel?
(NW) (N) (NE)
(SW) (S) (SE)
choice = Console.ReadLine();
Northwest northwest = new Northwest(myhero);
North north = new North(myhero);
Northeast northeast = new northeast(myhero);
//NE class will be added later
Console.WriteLine("I'm sorry, I didn't understand that.");
setnumber = 1;
rand = new Random();
battlechance = Random.Next(1, 100);
if (battlechance >= setnumber)
gibblychance = 10;
Console.WriteLine("Suddenly, a wild monster appears!");
monsterchance = randtwo.Next(1, 60);
if (monsterchance = 1);
if (monsterchance = 2);
if (monsterchance = 3);
if (monsterchance = 4);
Console.WriteLine("You've been attacked by a tribal raiding party!");
if (monsterchance = 5);
if (monsterchance = 6);
Console.WriteLine("A vicious warrior of Gorox appears, a Gorox Paladin!");
Battle battle = new Battle(myhero, Monster);
Tags for this Thread
Click Here to Expand Forum to Full Width