CIVILIZATION IV:iNoc

This might be kinda stupid, but does anyone know why this line of code causes a problem? When I comment it out, the problem vanishes.

Code:
CvCultureFamilyInfo& getCultureFamilyInfo(CultureFamilyTypes eIndex);
 
i love your resource stockpile system. LOVE IT. as a matter of fact i love it so much that i would like to know if i can have the source SDK, Python, and XML files so i can incorporate it in my personal blend of civ4BTS. If i ever go public of course ill give credit where credit is due.

also if im building a battleship how does it choose wither to use oil or uranium?

also also
This might be kinda stupid, but does anyone know why this line of code causes a problem? When I comment it out, the problem vanishes.

Code:
CvCultureFamilyInfo& getCultureFamilyInfo(CultureFamilyTypes eIndex);

idk about anyone else here but im going to need more info to help debug such a problem.
 
This might be kinda stupid, but does anyone know why this line of code causes a problem? When I comment it out, the problem vanishes.

Code:
CvCultureFamilyInfo& getCultureFamilyInfo(CultureFamilyTypes eIndex);

:dunno:
 
The error reads:
1>c:\Users\Josh\Documents\Programming\Projects\iNoc\CvGameCoreDLL\CvGlobals.h(1113) : error C2143: syntax error : missing ';' before '&'
But the line before it has a semicolon at the end! See?

Code:
	int getCultureFamily(CvString szTextVal) const;
	CvCultureFamilyInfo& getCultureFamilyInfo(CultureFamilyTypes eIndex);
 
The error reads:

But the line before it has a semicolon at the end! See?

Code:
	int getCultureFamily(CvString szTextVal) const;
	CvCultureFamilyInfo& getCultureFamilyInfo(CultureFamilyTypes eIndex);

I don't think it's referring to the previous line, it's talking about the &.
But as long as the types (CvCultureFamilyInfo and CultureFamilyTypes) are known this is all legal code.
So just printing two lines of code to get help is probably not sufficient.
 
Here's the complete error.

Code:
1>c:\Users\Josh\Documents\Programming\Projects\iNoc\CvGameCoreDLL\CvGlobals.h(1113) : error C2143: syntax error : missing ';' before '&'
1>c:\Users\Josh\Documents\Programming\Projects\iNoc\CvGameCoreDLL\CvGlobals.h(1113) : error C2501: 'CvGlobals::CvCultureFamilyInfo' : missing storage-class or type specifiers
1>c:\Users\Josh\Documents\Programming\Projects\iNoc\CvGameCoreDLL\CvGlobals.h(1113) : error C2501: 'CvGlobals::getCultureFamilyInfo' : missing storage-class or type specifiers
1>c:\Users\Josh\Documents\Programming\Projects\iNoc\CvGameCoreDLL\CvGlobals.h(1113) : warning C4183: 'getCultureFamilyInfo': missing return type; assumed to be a member function returning 'int'
 
in all my time doing c++ i have never seen a function that returns an & variable. I've seen an ampersand in front of a function call but that returns a refrence to the function. do you want to point to the returned value? if so use
CvCultureFamilyInfo* getCultureFamilyInfo(CultureFamilyTypes eIndex);
instead, if not idk
 
Could be related to the definition of CvCultureFamilyInfo, this is why I meant to see more code, although the additional error lines are also telling.

@DeathMaker900:
As C++ tries to avoid the use of C-style pointers it allows the use of references also as function return values, like here:
http://www.functionx.com/cpp/examples/returnreference.htm
(I also used C before and therefore overuse the C-style pointers instead of favoring references :))
 
I got it. I failed to write "class CvCultureFamilyInfo" at the top of CvGlobals.h.
 
From now on, I plan on laying down core features before moving on to new civs and stuff. I'll probably do either Natural Wonders (Courtesy of Dacubz, Jamie, Platyping, Hrochland, and others) or advanced economy next.
 
Probably not nearly that big.
 
Doing some debugging... Found a few already.
 
I'm going to start merging in VD, but I also have a little problem with building art. Look:

Spoiler :
attachment.php
attachment.php


Why is the image in NifScope inconsistent with the ingame image?
 

Attachments

  • temp2.jpg
    temp2.jpg
    64.6 KB · Views: 131
  • temp.jpg
    temp.jpg
    72 KB · Views: 146
The game is crashing with no error message, just a 'stopped working', on start. When I open the debugger, it says 'No symbols are loaded for call stack frame.' This definately has to do with VD, because it has never happened before. Does anyone have any ideas on what's wrong or how to fix it?
 
Screw this. I'm going back to the last stable version and I'll try merging VD later.
 
Right now I'm creating a new Sevopedia page for Natural Wonders.
 
Got nowhere.
 
Back
Top Bottom