What's new

Kompilacja Problem z kompilacj? .

Status
Not open for further replies.

Dark Magican

Senior User
Joined
Apr 13, 2009
Messages
677
Reaction score
42
Witam, dzi? doda?em pewien skrypt, do silnika Kentana 1.0 - i mam problem, ot?? pobra?em sporo bibliotek, te kt?re ludzie kazali lecz nadal mam jakie? b??dy.

Kompilator: Default compiler
Building Makefile: "E:\Projekt\DUPA\Kentana Engine 1.0\source\Makefile.win"
Wykonywanie make...
make.exe -f "E:\Projekt\DUPA\Kentana Engine 1.0\source\Makefile.win" all
g++.exe -c Pliki/actions.cpp -o Obj/actions.o -I"C:/Documents and Settings/Administrator/Pulpit/Nowy folder/The Forgotten Dev-Cpp/include" -DHUCZU_FOLLOW -DHUCZU_LOOT_INFO -DHUCZU_EXHAUSTED -DHUCZU_SKULLS -DHUCZU_BAN_SYSTEM -DHUCZU_MEGAMANAS -DYUR_CVS_MODS -DYUR_LOGIN_QUEUE -DYUR_BOH -DYUR_PVP_ARENA -DYUR_RINGS_AMULETS -DYUR_READABLES -DYUR_HIGH_LEVELS -DYUR_PREMIUM_PROMOTION -D_NG_BBK_SPAMSPELL__ -D_NG_BBK_PVP__ -D__KIRO_AKT__ -DTLM_HOUSE_SYSTEM -DTRS_GM_INVISIBLE -DCVS_DAY_CYCLE -DFIXY -fexpensive-optimizations -O3

Pliki/actions.cpp: In constructor `ActionScript::ActionScript(Game*, const std::string&, const std::string&)':

Pliki/actions.cpp:507: error: `luaopen_loadlib' was not declared in this scope

Pliki/actions.cpp:512: error: `lua_dofile' was not declared in this scope

make.exe: *** [Obj/actions.o] Error 1

Wykonanie zako?czone

Zdj?cie z Package Managera:

60608159558169147657.jpg
 

Baabuseek

Advanced User
Joined
Aug 17, 2008
Messages
449
Reaction score
45
Odp: Problem z kompilacj? .

lua 5.0.2

@DOWN
Wiec si? rozpisz? ale nie widz? w tym wi?kszego sensu. Masz zainstalowan? nowsz? (czyli z??) bibliotek? LUA kt?rej funkcje znacznie r??ni? si? od starej wersji st?d owy b??d.
 
Last edited:

Dark Magican

Senior User
Joined
Apr 13, 2009
Messages
677
Reaction score
42
Odp: Problem z kompilacj? .

@Moozie

To ?e? si? rozpisa? kolego. I tak, nic by mi to nie da?o.

Temat do zamkni?cia, jako? sobie poradzi?em.

\_Pozdrawiam.
 

Dark Magican

Senior User
Joined
Apr 13, 2009
Messages
677
Reaction score
42
Odp: Problem z kompilacj? .

Cze??, aby nie za?mieca? forum - wznowie temat, ot?? doda?em Task Sytem by Miziak i mam nast?puj?ce b??dy:

In file included from ../game.cpp:62:
../task.h:1: error: expected constructor, destructor, or type conversion before numeric constant
../task.h:1: error: expected `,' or `;' before numeric constant

In file included from ../game.cpp:62:
../task.h:22:2: #endif without #if
../game.cpp: In member function `void GameState::eek:nAttackedCreature(Tile*, Creature*, Creature*, int, bool)':
../game.cpp:556: error: `Tasks' has not been declared
../game.cpp:556: error: `isTaskMonster' undeclared (first use this function)
../game.cpp:556: error: (Each undeclared identifier is reported only once for each function it appears in.)
../game.cpp:561: error: `Tasks' has not been declared
../game.cpp:561: error: `getTaskStorage' undeclared (first use this function)
../game.cpp:562: error: `Tasks' has not been declared
../game.cpp:562: error: `getTaskCount' undeclared (first use this function)
../game.cpp:564: error: `Tasks' has not been declared

make.exe: *** [obj/game.o] Error 1

Execution terminated

Kto? ma jakie? pomys?y?
 

Samman

Senior User
Joined
Aug 23, 2009
Messages
782
Reaction score
39
Odp: Problem z kompilacj? .

Poka? kod C++ z tym taskiem.
 

Dark Magican

Senior User
Joined
Apr 13, 2009
Messages
677
Reaction score
42
Odp: Problem z kompilacj? .

B??d jest niby tu:

ifdef __MIZIAK_TASKS__

#ifndef TASKS_H
#define TASKS_H
#include <string>
#include <map>

class Tasks
{
private:
typedef struct{int storage; int count;} Taskarr;
typedef std::map<std::string, Taskarr> TasksMap;
static TasksMap task;
public:
static bool Load();
static int getTaskStorage(std::string);
static int getTaskCount(std::string);
static bool isTaskMonster(std::string);
};

#endif //TASKS_H
#endif //__MIZIAK_TASKS__


No i tu:

#ifdef __MIZIAK_TASKS__
if(attackedCreature && Tasks::isTaskMonster(attackedCreature->getName())){
std::string task_name = attackedCreature->getName();
Player *taskPlayer = dynamic_cast<Player*>(attacker);
if(taskPlayer){
long value;
if(taskPlayer->getStorageValue(Tasks::getTaskStorage(task_name),value)){
int count = Tasks::getTaskCount(task_name);
if(value-1 <= count){
taskPlayer->addStorageValue(Tasks::getTaskStorage(task_name), value+1);
char txt[1024];
if(count-value != 0){
sprintf(txt, "Musisz zabic jeszcze %i potworow o nazwie: %s!", count-value, task_name.c_str());
taskPlayer->sendCancel(txt);
}else{
sprintf(txt, "Wykonalem/am zadanie na zabicie %i potworow o nazwie %s musze udac sie po nagrode!", count, task_name.c_str());
game->creatureSay(taskPlayer,SPEAK_MONSTER2, txt);
}
}
}
}
}
#endif //__MIZIAK_TASKS__
 

Dantez

Moim sekretem jest ciasto
Joined
May 22, 2008
Messages
1,206
Reaction score
202
Odp: Problem z kompilacj? .

ifdef __MIZIAK_TASKS__
Na:
#ifdef __MIZIAK_TASKS__
 
Status
Not open for further replies.
Top