• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Compiling Error 1004 rev.

Ronaldino

Esso Eh
Joined
Dec 25, 2007
Messages
745
Reaction score
0
Hi.

When I try to compiled 1004 revision of Trunk I get this error;

..\trunk\commands.cpp In member function `bool Commands::reloadInfo(Creature*, const std::string&, const std::string&)':

598 ..\trunk\commands.cpp `g_npcs' was not declared in this scope

..\Makefile.win [Build Error] [forgottenserver/trunk/commands.o] Error 1

Its about this line;
g_npcs.reload();
 
yes its not your fault, its just an unstable revision. i get it to when compiling 1004-1005. if you really want to use it. then delete that portion of the reload command. there should be 3 files that have it in it. just delete the function that wont work, compile, it will bring you to the other error, delete, compile, repeat, then rebuild all.

I will post the things for you to delete in a minute. hold on.

EDIT:

Delete in commands.cpp
Code:
else if(tmpParam == "npc" || tmpParam == "npcs")
		{
			g_npcs.reload();
			player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "Reloaded npcs.");
		}

Delete in otserv.cpp
Code:
	break;
				case ID_MENU_GAME_RELOAD_NPCS:
					if(g_game.getGameState() != GAME_STATE_STARTUP)
					{
						if(g_npcs.reload())
							std::cout << "Reloaded npcs." << std::endl;
						else
							std::cout << "Failed to reload npcs." << std::endl;
					}

Delete in otserv.cpp
Code:
																	{

if(g_npcs.reload())

Delete in otserv.cpp
Code:
																				}
break;

Delete in gui_resources.rc
Code:
MENUITEM "&Monsters", ID_MENU_GAME_RELOAD_NPCS

To find these, do like I said, compile, look at the error it goes to, and find what i gave you and delete it, the errors are in order of my deletion advice

PS. Don't forget the "}" in the third to last and second to last deletion advice. those are important
 
Last edited:
Back
Top