I'm really confused...
CvLuaPlayer.cpp
First function written by firaxis. Second by me.
It's rather simple. Return the science modifier by having a vassal. They reference CvPlayerAI, I reference it, and I was confused because CvPlayerAI has no function called GetScienceFromBudgetDeficitTimes100, CvPlayer does.
Why on earth would the compiler accept GetScienceFromBudgetDeficitTimes100 and not GetScienceFromVassalsTimes100? Am I missing something? Is this some communication issue between LUA and C++? Because I'm lost and I don't want to let something as dumb as this get in the way of me completing this rather large project of mine.
CvLuaPlayer.cpp
Code:
//int GetScienceFromBudgetDeficitTimes100();
int CvLuaPlayer::lGetScienceFromBudgetDeficitTimes100(lua_State* L)
{
return BasicLuaMethod(L, &CvPlayerAI::GetScienceFromBudgetDeficitTimes100);
}
//int GetScienceFromVassalsTimes100();
int CvLuaPlayer::lGetScienceFromVassalsTimes100(lua_State* L)
{
return BasicLuaMethod(L, &CvPlayerAI::GetScienceFromVassalsTimes100);
}
First function written by firaxis. Second by me.
It's rather simple. Return the science modifier by having a vassal. They reference CvPlayerAI, I reference it, and I was confused because CvPlayerAI has no function called GetScienceFromBudgetDeficitTimes100, CvPlayer does.
Why on earth would the compiler accept GetScienceFromBudgetDeficitTimes100 and not GetScienceFromVassalsTimes100? Am I missing something? Is this some communication issue between LUA and C++? Because I'm lost and I don't want to let something as dumb as this get in the way of me completing this rather large project of mine.