2d sandbox need some guidance

#include <iostream>
#include <string>
using namespace std;

// Maximum number of items the player can have
const int MAX_ITEMS = 10000000000000000000000000000;

gamerunning = false


int userInput = 0;

int playerItems[MAX_ITEMS][10];
// The player can equip 1 thing; a weapon
int playerEquippedItems[4][10];

string itemNames[] = { "Blade", "Leather Garb" , "Iron Arrows" , "Steel Arrows" , };

short playerItemCount = 0; // How many items the player has

int playerLocation = 0; // A numerical reference to the location of the player

int currentEnemyHealth = 0;

void titleFunc(); // Handles the title screen
void newGameFunc(); // Handles creating a new game
void loadgamefunc(); // load the game
void installdlc(); // installs downloadable content

// world functions
void battlestart();
void battlewin();
void battlelose();


int main ()
{
titleFunc();

if gamerunning = true
if gameplaying = true
{
if(playerLocation == 1)
{
string str = "you have discovered Akavir"
SDL_drawBMP( "akavir.bmp" )
class player = new class // and you of course
class redoran_soldier = new class
class redoran_soldier = new class // guards dont want to get on their bad side
class akavir_armorer = new class // a guy who sells armor
class murazk = new class // the guy who runs the general store
class portal1 = new class
class portal2 = new class
}

if(playerLocation == 2)
{
string str = "you have discovered Drat - Tezuak Plantation"
SDL_drawBMP( "plantation.bmp" )
class player = new class // and you of course
class bandit = new class
class bandit = new class // guards dont want to get on their bad side
class drug_dealer = new class // a guy who sells armor
class drug_storage = new class
class portal3 = new class
}

}

if(playerLocation == 3)
{
string str = "you have discovered Vivec Canton Of Telvanni"
SDL_drawBMP( "vivec canton.bmp" )
class player = new class // and you of course
class telvanni_guard = new class
class telvanni_guard = new class
class telvanni_guard = new class
class huntsman = new class
class portal4 = new class
}

}

if(playerLocation == 4)
{
string str = "you have discovered Vivec Canton Of Redoran"
SDL_drawBMP( "vivec canton.bmp" )
class player = new class // and you of course
class redoran_guard = new class
class redoran_guard = new class
class redoran_guard = new class
class firearms_dealer = new class
class portal5 = new class
}

}

if(playerLocation == 5)
{
string str = "you have discovered Fort Hawkmoon"
SDL_drawBMP( "legion fort.bmp" )
class player = new class // and you of course
class Imperial_Soldier = new class
class legate_mazurak = new class
class priest_zayabesiraga = new class
class Imperial_Soldier = new class
class Imperial_Soldier = new class
class portal6 = new class
}

if(playerLocation == 6)
{
string str = "you have discovered Wolfspire"
SDL_drawBMP( "wolfspire.bmp" )
class player = new class // and you of course
class Renjin = new class
class Cyrax = new class
class Thunderwing = new class
class Enclave_soldier = new class
class Enclave_soldier = new class
class portal7 = new class
}
if(playerLocation == 7)
{
string str = "you have discovered Skyseers Tower"
SDL_drawBMP( "sstower.bmp" )
class player = new class // and you of course
class skyguard_soldier = new class
class skyguard_soldier = new class
class Falsmaryon = new class
class Cloud = new class
class Falcon = new class
class Assassin = new class
class portal8 = new class
}
if(playerLocation == 8)
{
string str = "you have discovered Wolfkrone Temple"
SDL_drawBMP( "wktemple.bmp" )
class player = new class // and you of course
class Hunter = new class
class Vampire_Slayer_E = new class
class Daza_w = new class
class Daggerfall_Spy = new class
class Cerulean_Sniper = new class
class Cerulean_Sniper = new class
class portal9 = new class
}

if(playerLocation == 9)
{
string str = "you have discovered Moonlight City"
SDL_drawBMP( "moonlight.bmp" )
class player = new class // and you of course
class Enclave_soldier = new class
class Redoran_gunner = new class
class Redoran_gunner = new class
class Parthunax = new class
class Mercer_Langerwine = new class
class Assassins guild = new class // the assassin guild
class portal10 = new class
}

if(playerLocation == 10)
{
string str = "you have discovered Kymzeeige"
SDL_drawBMP( "kyzeeige.bmp" )
class player = new class // and you of course
class Valkyrie_Knight = new class
class Valkyrie_Knight = new class
class Goddesss_Covenant = new class // the valkyrie guild
class Zamarik = new class
class Dharak_Quantum = new class
class dark_portal = new class // the assassin guild
class portal11 = new class
}

if(playerLocation == 11)
{
string str = "you have discovered Daggerfire"
SDL_drawBMP( "daggerfire.bmp" )
class player = new class // and you of course
class Skyguard_Tesmarylon = new class
class Ventus = new class
class Pyrus = new class // the valkyrie guild
class Dietza = new class
class Daggers_Swords = new class // a massive weapon store
class Crystal_EX = new class // a level 500 sword also involves a quest
class portal12 = new class
}

if(playerLocation == 12)
{
string str = "you have discovered Vetro Mountain"
SDL_drawBMP( "vetro.bmp" )
class player = new class // and you of course
class rogue = new class
class werewolf = new class
class werewolf = new class // the valkyrie guild
class diseased_werewolf = new class
class giant_bear = new class
class portal14 = new class
class portal13 = new class
}






// title screen

void titleFunc()
{
SDL_drawBMP( "title.bmp" )
class newgame = new class
class loadgame = new class
class dlc = new class
class quit = new class
}

// the battle system

void battlestart
{
string str = "get ready for battle !!!!!"
enemyfoe = true

if win = true
string str = "you have won the battle !!!!"

if lose = true
string str = "game over !!!!!!"
class gameover = new class

if premeptive = true
string str = " your party got the upper hand !!!!"
damage += 2500

if weakpoint = true
string str = "you have striked the foes weakspot !!!"
damage += 10000 bleeding = true

if execution = true
string str = "EXECUTION !!!!! Critical Damage "
instantdeath = true
}




// game handlers

void newGameFunc();
{
string str = "loading game please wait"
string str = "6000 years after molochs defeat a hero of the vikings rose from the grave"
string str = "loki valskyrre was his name he had one task to destroy spectra and his army"
string str = "this how the epic war began"
string str = "wake up hello wake up use the defribilator ZZZZZT !!!"
string str = "still nothing general do it again med ZZZZZT !!!! ZZZZT !!!! ZZZZT!!!!"
string str = "????: where am I"
string str = "general spectra: you are my servant viking now i have a task"
string str = "?????: okay what is it"
string str = "general spectra: you will kill a city of innocents"
string str = "????: yes sir"
// choose a side
cin >> userInput;
if(userInput == 1) allyevil = true // Go East
else if(userInput == 2) allygood = true // Go West

// if your evil
if allyevil = true
string str = "kill the people in the nearby refuge"





this is my computer code so far
i checked it for errors on eclipse and it is full of errors
for some reason could eclipse be right i think it is because compilers rarely make mistakes like this

let me explain some of it
string str = "destroy a box"; // i heard that this is how a string is called by looking on MSDN

class box = new class; // i do this to render the objects in the level like make them appear i add the SDL_loadBMP function a lot

the cout function near the end i use for a player choice

and i use the if statement for determining conditions

i checked on IDEone and compiled it the only error that comes up is sdl.h cannot be found or this
prog.cpp:11:23: warning: integer constant is too large for its type [enabled by default]
prog.cpp:11:23: warning: overflow in implicit constant conversion [-Woverflow]
prog.cpp:15:1: error: ‘gamerunning’ does not name a type
prog.cpp:25:30: error: size of array ‘playerItems’ is too large
prog.cpp: In function ‘int main()’:
prog.cpp:79:6: error: expected ‘(’ before ‘gamerunning’
prog.cpp:547:19: error: expected ‘}’ at end of input


which is right ? ideone or eclipse

ideone comes up with a few errors eclipse says the whole things wrong
for the function
class gun = new class i got that off your website when it was requested

if you are going to answer my question DO NOT be harsh im still new to c++
any harsh comments will be ignored

i only want what im doing wrong and either the corrected code or how i can fix it
not "oh you should do something simple like pong !!" thats annoying beacuse ive already done the simple games like "pong" im not trying to sound like a snob but thats the honest truth ive been making basic games for 3 years
now i want to turn up the heat make something worth making something fun not like GTA V or final fantasy 13-2 but a more advanced 2d hack and slash

yes i said 2d not 3d once i learn the hack slash method ill move onto basic 3d games

i have made
one platformer
simple games like pong
2d turn based RPG like the old zelda games
2d adventure game

im in no rush to learn 3d

my new hack and slash game will look like in the screenshots only
2d and no sexy shiny graphics and more simpler gameplay

http://www.ff-versusxiii.net/images/media/4dc4e547_FFVXIIIGP5.png
http://cdn.dualshockers.com/wp-content/uploads/2011/02/ffversusxiii_04.jpg
http://images4.wikia.nocookie.net/__cb20110921155430/finalfantasy/images/b/bc/FinalFantasyVersusXIII_combat_2.jpg
http://images4.wikia.nocookie.net/__cb20110921160942/finalfantasy/images/3/3b/FinalFantasyVersusXIII_combat_3.jpg

the characters

vapor skyblade
style: floating weapons and skysword
he wears similar clothes to noctis lucis caleum

?????
style: viking blade
he is a unknown character contacted by a god to destroy spectra

kyzerix caelum vanhussei
style: g himmel firesword
he is an assassin like connor kenway who fights for revenge

this game im working on follows three warriors
with three story modes with a fair few missions in place clashing and lacing with each other

what the game will have if someone helps me
possibly simple 2d physics
a Action battle system
a sandbox like feel but in a platformer sense
inventory
enchanting (a patch relased later)
skills
3 special story modes
possibly some bonus patches containing bonus content

the thing is i want it to be modern looking and fun and have hourly gameplay

i havent been making games like this because ive been told to do what ive already done for so long ive never made a game like this

thankyou please help me i will be very grateful and hey i might give out free copies of the game to anyone who helps








i only want what im doing wrong and either the corrected code or how i can fix it
not "oh you should do something simple like pong !!"


I would suggest something simpler. Like getting and reading a good book.

http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list



Topic archived. No new replies allowed.