Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2006, 07:45 AM
LostZaphod
Sarnak
 
Join Date: May 2006
Posts: 43
Default shareddb.cpp

I kept receiving the error message
shareddb.cpp
line 251
Run-Time Check Failure #3 - The variable 'augslot' is being used without being defined.

At the top it is defined as
uint32 augslot[5] = { 0, 0, 0, 0, 0 };
and on line 251
uint32 len_query = MakeAnyLenString(&query, "REPLACE INTO inventory (charid,slotid,itemid,charges,instnodrop,color,aug slot1,augslot2,augslot3,augslot4,augslot5) VALUES(%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i)",
char_id, slot_id, inst->GetItem()->ID, charges, inst->IsInstNoDrop() ? 1:0,inst->GetColor(),augslot[0],augslot[1],augslot[2],augslot[3],augslot[4],augslot[5] );

you find the augslot[5] (that is the sixth item of the array, and only five are defined). There are also 11 %i, but 12 variables are being passed. We need to remove the ",augslot[5]" from the line.
Code:
cvs diff -u -- shareddb.cpp (in directory C:\cvs\EQEmuCVS\Source\common\)
Index: shareddb.cpp
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/common/Attic/shareddb.cpp,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 shareddb.cpp
--- shareddb.cpp	22 May 2006 04:03:49 -0000	1.1.2.8
+++ shareddb.cpp	14 Oct 2006 19:33:13 -0000
@@ -248,7 +248,9 @@
 				charges = 255;
 			// Update/Insert item
 			uint32 len_query = MakeAnyLenString(&query, "REPLACE INTO inventory (charid,slotid,itemid,charges,instnodrop,color,augslot1,augslot2,augslot3,augslot4,augslot5) VALUES(%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i)",
-				char_id, slot_id, inst->GetItem()->ID, charges, inst->IsInstNoDrop() ? 1:0,inst->GetColor(),augslot[0],augslot[1],augslot[2],augslot[3],augslot[4],augslot[5] );
+				char_id, slot_id, inst->GetItem()->ID, charges, inst->IsInstNoDrop() ? 1:0,inst->GetColor(),augslot[0],augslot[1],augslot[2],augslot[3],augslot[4] );
+			//uint32 len_query = MakeAnyLenString(&query, "REPLACE INTO inventory (charid,slotid,itemid,charges,instnodrop,color,augslot1,augslot2,augslot3,augslot4,augslot5) VALUES(%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i)",
+			//char_id, slot_id, inst->GetItem()->ID, charges, inst->IsInstNoDrop() ? 1:0,inst->GetColor(),augslot[0],augslot[1],augslot[2],augslot[3],augslot[4],augslot[5] );
 			
 			ret = RunQuery(query, len_query, errbuf);
 		}

***** CVS exited normally with code 1 *****
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:32 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3