Quote:
Originally Posted by dclark
Hello, I am trying to make a server on linux since I have gcc and I am runing into some trouble. I have world working it connects to the net fine even with errors poping up in the compile, but I can't say the same for zone. When I get to database.cpp I get this error :
database.cpp: In member function `bool Database::GetInventory(uint32, char*, Inventory*)':
database.cpp:2902: error: invalid conversion from `const ItemCommonInst*' to `uint32'
database.cpp:2902: error: initializing argument 1 of `ItemCommonInst::ItemCommonInst(uint32, sint16, uint32, uint32, uint32, uint32, uint32)'
I found the code that is was complaning about, but havn't a clue as to what is wrong.
#ifndef WORLD
for(int i=0;i<5;i++) {
if (aug[i]) {
ItemCommonInst aug(aug[i]);
common.PutAugment(aug,i);
}
}
if (instnodrop)
common.SetInstNoDrop(true);
#endif
If anyone has any ideas please share.
|
The problem is that there's a new object being named "aug" and there's an array named "aug" there. I think the C++ standard says they are in seperate namespaces, but I get that error with gcc-3.4. I worked around it by appending an "X" to the name of the new ug (the one that's a ItemCommonInst, so we have:
Code:
if (aug[i]) {
ItemCommonInst augX(aug[i]);
common.PutAugment(augX,i);
}
Note that although this compiles, I have NO IDEA if it's what should be happening...
Since my Linux box is so terribly underpowered I've given up trying to build a server that works until I can find a P4 class machine with decent ram that I can afford.