• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Error Compiling plugin (1 Viewer)

Jukas

New member
Joined
Aug 12, 2005
RedCents
I'm new to compiling plugins but I found and followed the information in the thread Here. I was trying to compile a simple tellrelay plugin from Kenetix that was linked from a thread here.

Using MS Visual Studio 2005 I'm getting the following error when I try and build the project.

------ Build started: Project: MQ2TellRelay, Configuration: Release Win32 ------
Compiling...
MQ2TellRelay.cpp
EQLIB_IMPORTS
c:\documents and settings\user\desktop\mq2-20060501\mq2tellrelay\mq2tellrelay.cpp(59) : warning C4700: uninitialized local variable 'Father' used
Build log was saved at "file://c:\Documents and Settings\user\Desktop\MQ2-20060501\MQ2TellRelay\Intermediate\BuildLog.htm"
MQ2TellRelay - 0 error(s), 1 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

and the compile terminates. I did copy the code as posted into the .cpp file before compiling. I don't know if this is a problem local to VS, or if I did something wrong. Can these be compiled by another C compiler, say GCC under a linux shell or is it windows library dependant?

Any advice would be much appreciated.
 
double check the code you copy and pasted....

looks like there is a line missing ...

OR


copy and paste added an extra space .. maybe ....

check line 59 and see if maybe ther is an extra one floating around

ARMY
 
I don't see an extra space at loine 59. I've pasted the source and highlighted line 59. As I said I'm new to compiling plugins, so hopefully it's someting I missed.

Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2TellRelay");

CHAR NewMaster[MAX_STRING]={0};
CHAR EchoMaster[MAX_STRING];

VOID SetMaster(PSPAWNINFO pChar, PCHAR szLine);

VOID LoadINI()
{
    GetPrivateProfileString("MQ2TellRelay", "MasterKey", 0, NewMaster, MAX_STRING, INIFileName);
}

PLUGIN_API VOID InitializePlugin(VOID)
{
   AddCommand("/setmaster",SetMaster);
   if (MQ2Globals::gGameState==GAMESTATE_INGAME) {
         sprintf(INIFileName,"%s\\MQ2TellRelay.ini",gszINIPath);
         LoadINI();
   }
   if (NewMaster[0]!=0)
   {
      sprintf(EchoMaster,"Relaying tells to %s.",NewMaster);
      WriteChatColor(EchoMaster, CONCOLOR_LIGHTBLUE);
   } else {
      WriteChatColor("Use /setmaster to start relaying tells.", CONCOLOR_RED);
   }
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
   RemoveCommand("/setmaster");
}

VOID SetMaster(PSPAWNINFO pChar, PCHAR szLine)
{
   CHAR szArg[MAX_STRING];
   CHAR szOutput[MAX_STRING];

   GetArg(szArg,szLine,1);
    strcpy(NewMaster, szArg);

   WritePrivateProfileString("MQ2TellRelay", "MasterKey", NewMaster, INIFileName);

   sprintf(szOutput, "Master has been set to %s.", NewMaster);
   WriteChatColor(szOutput, CONCOLOR_YELLOW);
}

PLUGIN_API DWORD OnIncomingChat(PCHAR Line, DWORD Color)
{
   CHAR TheTell[MAX_STRING];
   CHAR TextString[MAX_STRING];
   CHAR szTell[MAX_STRING];
   PSTR Text;

   if (strstr(Line, "tells you, '") || strstr(Line,"told you, '")) {
      char* Father;
      strcpy(TheTell, Father);

      Text = GetNextArg(Line,1,FALSE,'\'');

      strcpy(TextString,Text);
      TextString[strlen(Text)-1] = '\0';
     
      sprintf(szTell,"/tell %s [[Got a tell]]: %s",(NewMaster),(TheTell));
      DoCommand((PSPAWNINFO)pCharSpawn,szTell);
   }
return 0;
}
 
Error Compiling plugin

Users who are viewing this thread

Back
Top