Bug: Compile errors with 20041219.zip

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Bug: Compile errors with 20041219.zip

Post by SwiftyMUSE » Sun Dec 19, 2004 6:46 pm

Compiling...
MQ2Utilities.cpp
l:\mq2\mq2main\mq2utilities.cpp(2507) : warning C4715: 'ShowSpellSlotInfo' : not all control paths return a value
Linking...

Code in MQ2Utilities.cpp needs to be changed from:

Code: Select all

      default: //undefined effect 
         sprintf(szTemp, "UnknownEffect%03d", pSpell->Attrib[i]); 
         strcat(szBuff,szTemp); 
         break; 
	  if ( !bSlotIsPH ) {
		  strcat(szBuffer, szBuff);
		  strcat(szBuffer, "<br>" );
	  }
     } 
   return szBuffer;
   }
} 
to:

Code: Select all

      default: //undefined effect 
         sprintf(szTemp, "UnknownEffect%03d", pSpell->Attrib[i]); 
         strcat(szBuff,szTemp); 
         break; 
      } 
      if ( !bSlotIsPH ) {
	     strcat(szBuffer, szBuff);
	     strcat(szBuffer, "<br>" );
      }
   }
   return szBuffer;
} 
at the end of funtion:

Code: Select all

// *************************************************************************** 
// Function:    ShowSpellSlotInfo
// Author:      Koad (used in his SpellSearch Plugin)
// *************************************************************************** 
PCHAR ShowSpellSlotInfo(PSPELL pSpell, PCHAR szBuffer) 

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Sun Dec 19, 2004 7:08 pm

thanks. I was waiting on someone to find that ..lol. I just couldn't force myself to look at that function for any length of time.

New zip fixes it (20041219b.zip)

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:42 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:43 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:44 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:45 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:46 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:48 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:49 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:50 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:51 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:52 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:53 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:54 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Bug: Compile errors with 20041219.zip

Post by xyilla » Mon Mar 10, 2025 8:56 pm