HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Taming a critter with a button code help

View previous topic View next topic Go down 
AuthorMessage
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Taming a critter with a button code help   Tue Nov 10, 2015 12:24 am

Hi there. I'm trying to implement taming critters with a button from Centelleo's code list, however it is giving me errors that I don't know how to fix. I've asked Cent about it and she doesn't know what the issue is. I have four critters I wish to apply the code to, Pet Rock, Duckling, Kitten, and Mitzi, all of which are in the cd1.

In this log, I've tried using the definition tameLionCub as in Cent's tutorial, but it gave me the same errors.
Compile log:
 

Compile log:
 

Compile log:
 

Code:
void tamePetRock(const unsigned short &iID)
 {
 //tame pet rock
 RakNet::BitStream tBitStream;

 tBitStream.Write(MessageID(ID_CRITTERINFO));
 tBitStream.Write(iID);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(true);
 tBitStream.Write((OwnerToken)mUnitManager->getPlayer()->getIndex());
 mUnitManager->getPlayer()->setPet("Pet Rock");

 mPeer->Send(&tBitStream, LOW_PRIORITY, RELIABLE, 4, UNASSIGNED_SYSTEM_ADDRESS, true);
 }
 void tameDuckling(const unsigned short &iID)
 {
 //tame duckling
 RakNet::BitStream tBitStream;

 tBitStream.Write(MessageID(ID_CRITTERINFO));
 tBitStream.Write(iID);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(true);
 tBitStream.Write((OwnerToken)mUnitManager->getPlayer()->getIndex());
 mUnitManager->getPlayer()->setPet("Duckling");

 mPeer->Send(&tBitStream, LOW_PRIORITY, RELIABLE, 4, UNASSIGNED_SYSTEM_ADDRESS, true);
 }
 void tameMitzi(const unsigned short &iID)
 {
 //tame mitzi
 RakNet::BitStream tBitStream;

 tBitStream.Write(MessageID(ID_CRITTERINFO));
 tBitStream.Write(iID);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(true);
 tBitStream.Write((OwnerToken)mUnitManager->getPlayer()->getIndex());
 mUnitManager->getPlayer()->setPet("Mitzi");

 mPeer->Send(&tBitStream, LOW_PRIORITY, RELIABLE, 4, UNASSIGNED_SYSTEM_ADDRESS, true);
 }
 void tameKitten(const unsigned short &iID)
 {
 //tame kitten
 RakNet::BitStream tBitStream;

 tBitStream.Write(MessageID(ID_CRITTERINFO));
 tBitStream.Write(iID);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(false);
 tBitStream.Write(true);
 tBitStream.Write((OwnerToken)mUnitManager->getPlayer()->getIndex());
 mUnitManager->getPlayer()->setPet("Kitten");

 mPeer->Send(&tBitStream, LOW_PRIORITY, RELIABLE, 4, UNASSIGNED_SYSTEM_ADDRESS, true);
 }

Code:
else if(tFunction=="Adopt Pet Rock")
 {
 MagixCritter *tCritter = mCritterManager->getByObjectNode(mCurrentObject);
 if (!tCritter)return;
 mNetworkManager->tamePetRock(tCritter->getID());
 }
 else if(tFunction=="Adopt Duckling")
 {
 MagixCritter *tCritter = mCritterManager->getByObjectNode(mCurrentObject);
 if (!tCritter)return;
 mNetworkManager->tameDuckling(tCritter->getID());
 }
 else if(tFunction=="Adopt Mitzi")
 {
 MagixCritter *tCritter = mCritterManager->getByObjectNode(mCurrentObject);
 if (!tCritter)return;
 mNetworkManager->tameMitzi(tCritter->getID());
 }
 else if(tFunction=="Adopt Kitten")
 {
 MagixCritter *tCritter = mCritterManager->getByObjectNode(mCurrentObject);
 if (!tCritter)return;
 mNetworkManager->tameKitten(tCritter->getID());
 }

Code:
//Critter commands
 else if(tCritter->getCritterType() == "Pet Rock")
 {
 mButtonText[BUTTON_SELECTBOX1]->setCaption("Adopt Pet Rock");
 mButtonText[BUTTON_SELECTBOX2]->setCaption("");
 mButtonText[BUTTON_SELECTBOX3]->setCaption("");
 mButtonText[BUTTON_SELECTBOX4]->setCaption("");
 }
 else if(tCritter->getCritterType() == "Duckling")
 {
 mButtonText[BUTTON_SELECTBOX1]->setCaption("Adopt Duckling");
 mButtonText[BUTTON_SELECTBOX2]->setCaption("");
 mButtonText[BUTTON_SELECTBOX3]->setCaption("");
 mButtonText[BUTTON_SELECTBOX4]->setCaption("");
 }
 else if(tCritter->getCritterType() == "Mitzi")
 {
 mButtonText[BUTTON_SELECTBOX1]->setCaption("Adopt Mitzi");
 mButtonText[BUTTON_SELECTBOX2]->setCaption("");
 mButtonText[BUTTON_SELECTBOX3]->setCaption("");
 mButtonText[BUTTON_SELECTBOX4]->setCaption("");
 }
 else if(tCritter->getCritterType() == "Kitten")
 {
 mButtonText[BUTTON_SELECTBOX1]->setCaption("Adopt Kitten");
 mButtonText[BUTTON_SELECTBOX2]->setCaption("");
 mButtonText[BUTTON_SELECTBOX3]->setCaption("");
 mButtonText[BUTTON_SELECTBOX4]->setCaption("");
 }

Any help is appreciated. Thanks! c:
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Tue Nov 10, 2015 9:36 pm

I've also come up with another thing involving our dearly loved sky. The horizon line. It looks awful.
(Instead of making another thread I'll just use this one)

I've heard that it was supposedly impossible to fix, but if it works with the oIT sky, why not another texture?



Any help for either issue is highly appreciated. c:
Back to top Go down
Nakti
®
®
avatar

Game username : Nakti
Server : World of Pandora
Female Posts : 163
Join date : 2012-08-24
Age : 22
Location : black celebration

PostSubject: Re: Taming a critter with a button code help   Thu Nov 12, 2015 9:52 pm

That error means you have inserted this functions into the another functions.
Please check that the previous function has ended (with '}' symbol), than make a new line after that and paste the codes there.
If you are inserting this to the end of file, there are at least two '}'s at the end. Paste your codes directly before the last one.

[s]Those c++ brackets... If you lose one small - it will riun the whole compile...[/s]

The oIT sky has transparency on the edges in the mask so that there is smooth gradient between the skyDome and the lower fog.
You can also change the updateCelestials() in MagixSkyManager to make it use darker fog (variable fadeColour must be the one you should modify).
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Fri Nov 13, 2015 8:02 pm

Okay, I checked everything, and none of it seemed to be out of place. I recompiled (after I realized that my void lines were a tab back and fixed them)
And then this comes up: (had to cut out a bunch of the warnings to make the post short enough)

Compile log wrote:
1>------ Build started: Project: game, Configuration: Release Win32 ------
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnitManager.h(1449): warning C4244: 'argument' : conversion from 'const unsigned short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnitManager.h(1510): warning C4244: 'argument' : conversion from 'int' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnitManager.h(1510): warning C4244: 'initializing' : conversion from 'Ogre::Real' to 'unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnitManager.h(1563): warning C4244: 'initializing' : conversion from 'const unsigned short' to 'const OwnerToken', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixChatManager.h(113): warning C4244: 'initializing' : conversion from 'const Ogre::Real' to 'int', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixChatManager.h(127): warning C4244: '=' : conversion from 'const Ogre::Real' to 'int', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixAlertBox.h(50): warning C4244: 'initializing' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixAlertBox.h(75): warning C4244: 'initializing' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(197): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(197): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(202): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(202): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(350): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(350): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(350): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(358): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(358): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(358): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(366): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(366): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(366): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(455): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(914): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(914): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(969): warning C4244: 'initializing' : conversion from 'double' to 'const Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(984): warning C4244: '=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(988): warning C4244: '=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(1046): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(1046): warning C4244: 'argument' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(1068): warning C4244: 'argument' : conversion from 'int' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(1420): warning C4244: 'argument' : conversion from 'double' to 'const Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixCharScreenManager.h(1420): warning C4244: 'argument' : conversion from 'double' to 'const Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1542): error C2143: syntax error : missing ';' before '.'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1542): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1542): error C2238: unexpected token(s) preceding ';'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1543): error C2143: syntax error : missing ';' before '.'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1543): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1543): error C2238: unexpected token(s) preceding ';'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1544): error C2061: syntax error : identifier 'EncodeString'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1544): error C2238: unexpected token(s) preceding ';'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1545): error C2061: syntax error : identifier 'EncodeString'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1545): error C2143: syntax error : missing ')' before ';'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1545): error C2238: unexpected token(s) preceding ';'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1547): error C2143: syntax error : missing ',' before '.'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1547): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1549): error C2143: syntax error : missing ';' before '->'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1549): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1549): error C2238: unexpected token(s) preceding ';'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1551): error C2628: 'MagixNetworkManager' followed by 'void' is illegal (did you forget a ';'?)
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1553): error C2065: 'playerListUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1568): error C2065: 'playerList' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1568): error C2228: left of '.begin' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1568): error C2065: 'playerList' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1568): error C2228: left of '.end' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1574): error C2561: 'processPlayerData' : function must return a value
1>          c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1551) : see declaration of 'processPlayerData'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1577): error C2065: 'playerList' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1577): error C2228: left of '.push_back' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1578): error C2561: 'processPlayerData' : function must return a value
1>          c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1551) : see declaration of 'processPlayerData'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1582): error C2065: 'playerList' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1582): error C2228: left of '.begin' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1582): error C2065: 'playerList' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1582): error C2228: left of '.end' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1587): error C2065: 'playerList' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1587): error C2228: left of '.erase' must have class/struct/union
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1591): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1591): error C2227: left of '->removePartyMember' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1591): error C2065: 'mChatManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1591): error C2227: left of '->message' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(181): warning C4244: 'argument' : conversion from 'int' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(181): warning C4244: 'initializing' : conversion from 'Ogre::Real' to 'unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(245): warning C4244: '+=' : conversion from 'double' to 'Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(412): error C3861: 'processBio': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(413): error C3861: 'processLogon': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(414): error C3861: 'processCreateAccount': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(415): error C3861: 'processLoadChar': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(416): error C3861: 'processCreateChar': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(417): error C3861: 'processEditChar': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(418): error C3861: 'processEditAccount': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(419): error C3861: 'processKick': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(420): error C3861: 'processItemDrop': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(421): error C3861: 'processItemPickup': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(422): error C3861: 'processItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(423): error C3861: 'processItemUnequip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(424): error C3861: 'processGodSpeak': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(425): error C3861: 'processForceLogout': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(426): error C3861: 'processEvent': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(427): error C3861: 'processInfo': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(429): error C3861: 'processCritterOwnage': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(432): error C3861: 'processCritterInfo': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(434): error C3861: 'processCritterTargetedInfo': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(443): error C3861: 'processPlayerInfo': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(445): error C3861: 'processItemStash': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(446): error C3861: 'processFindPlayer': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(447): error C3861: 'processServerList': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(448): error C3861: 'processServerConnected': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(449): error C3861: 'processMaintenance': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(710): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(710): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(710): warning C4244: 'argument' : conversion from 'short' to 'const unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(740): error C3861: 'sendInfo': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(999): warning C4244: 'initializing' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1027): warning C4244: 'initializing' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1113): warning C4244: 'initializing' : conversion from 'unsigned long' to 'unsigned char', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1254): error C3861: 'sendMyCritters': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1264): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1265): error C3861: 'sendPlayerUpdate': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1270): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1281): error C3861: 'disownCritters': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1328): warning C4244: 'argument' : conversion from 'int' to 'const Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1329): error C3861: 'sendCritterCreate': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1331): error C3861: 'sendImReady': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1358): error C3861: 'sendAllItems': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1396): error C3861: 'disownCritters': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1441): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1448): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1455): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1464): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1465): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1472): error C3861: 'sendItemEquip': identifier not found
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1596): error C2065: 'playerListUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1597): error C2065: 'playerListUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1618): error C2065: 'mDef' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1618): error C2227: left of '->loadBio' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1618): error C2228: left of '.c_str' must have class/struct/union
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1620): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1620): error C2227: left of '->Send' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1627): error C2065: 'targetBioUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1628): error C2065: 'targetBioUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1628): error C2065: 'targetBioUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1640): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1640): error C2227: left of '->Send' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1644): error C2065: 'targetBioUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1645): error C2065: 'targetBioUpdated' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1659): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1659): error C2227: left of '->Send' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1663): error C2065: 'isMainServerConnection' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1670): error C2065: 'networkMessage' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1681): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1681): error C2227: left of '->Send' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1685): error C2065: 'isMainServerConnection' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1692): error C2065: 'networkMessage' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1702): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1702): error C2227: left of '->Send' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1706): error C2065: 'isMainServerConnection' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1717): error C2065: 'mCharScreenManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1717): error C2227: left of '->setNumChars' must point to class/struct/union/generic type
1>          type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1719): error C2065: 'networkMessage' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1719): fatal error C1003: error count exceeds 100; stopping compilation
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

All I did was change the caption (from Adopt to Tame) and move the void lines back one tab??

(post is too long, must use another one)
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Fri Nov 13, 2015 8:03 pm

(here's the second post)
Here's my stuff now: (included the egg codes for the first one as reference)

Spoiler:
 

As for the sky, I think I'll just revert back to the old texture as the one I have now has a color scheme nowhere near the scheme of the skyDome so making it blend nicely and look nice wouldn't work well. Thanks anyways though!
Back to top Go down
Nakti
®
®
avatar

Game username : Nakti
Server : World of Pandora
Female Posts : 163
Join date : 2012-08-24
Age : 22
Location : black celebration

PostSubject: Re: Taming a critter with a button code help   Fri Nov 13, 2015 9:39 pm

Looks that now you kave one extra closing bracket somewhere. Don't you mind sending me the whole file in PM? Or just posting a piece of code beginning on "void sendValidateName()" and ending ... for example, right before the "void processBio(Packet *p)" line.

Later versions of Visual Studio have a feature of automatical formatting of your code. For example if you paste a piece of code somewhere, Visual Studio will put all the needed tabs automatically and you will clearly see where there are those stupid brackets errors: lines will be shifted.
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Fri Nov 13, 2015 9:44 pm

Okay, found my mistake and now I'm only getting these errors:

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixGUI.h(4128): error C2039: 'tamePetRock' : is not a member of 'MagixNetworkManager'
1> c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(74) : see declaration of 'MagixNetworkManager'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixGUI.h(4134): error C2039: 'tameDuckling' : is not a member of 'MagixNetworkManager'
1> c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(74) : see declaration of 'MagixNetworkManager'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixGUI.h(4140): error C2039: 'tameMitzi' : is not a member of 'MagixNetworkManager'
1> c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(74) : see declaration of 'MagixNetworkManager'
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixGUI.h(4146): error C2039: 'tameKitten' : is not a member of 'MagixNetworkManager'
1> c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(74) : see declaration of 'MagixNetworkManager'

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1476): error C2601: 'tamePetRock' : local function definitions are illegal
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1492): error C2601: 'tameDuckling' : local function definitions are illegal
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1508): error C2601: 'tameMitzi' : local function definitions are illegal
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1524): error C2601: 'tameKitten' : local function definitions are illegal
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(2873): warning C4244: 'initializing' : conversion from 'double' to 'const Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(2880): warning C4244: 'initializing' : conversion from 'double' to 'const Ogre::Real', possible loss of data
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1486): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1486): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1486): error C2227: left of '->getIndex' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1487): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1487): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1487): error C2227: left of '->setPet' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1489): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1489): error C2227: left of '->Send' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1502): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1502): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1502): error C2227: left of '->getIndex' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1503): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1503): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1503): error C2227: left of '->setPet' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1505): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1505): error C2227: left of '->Send' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1518): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1518): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1518): error C2227: left of '->getIndex' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1519): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1519): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1519): error C2227: left of '->setPet' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1521): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1521): error C2227: left of '->Send' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1534): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1534): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1534): error C2227: left of '->getIndex' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1535): error C2065: 'mUnitManager' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1535): error C2227: left of '->getPlayer' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1535): error C2227: left of '->setPet' must point to class/struct/union/generic type
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1537): error C2065: 'mPeer' : undeclared identifier
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixNetworkManager.h(1537): error C2227: left of '->Send' must point to class/struct/union/generic type
1> type is ''unknown-type''

And I'm pretty sure the tame____ should've been defined in the first section of code in Cent's tutorial. xD
Back to top Go down
Centelleo
Banned
avatar

Game username : Centelleo
Server : Foreign Entity
Female Posts : 329
Join date : 2012-01-10

PostSubject: Re: Taming a critter with a button code help   Fri Nov 13, 2015 10:09 pm

I'm pretty sure I've defined it, you sent your source to me and it was already there xD
Back to top Go down
http://taleofmervian.tk
Nakti
®
®
avatar

Game username : Nakti
Server : World of Pandora
Female Posts : 163
Join date : 2012-08-24
Age : 22
Location : black celebration

PostSubject: Re: Taming a critter with a button code help   Fri Nov 13, 2015 10:12 pm

Could you please send the whole file? Or just the piece of it, containing new functions AND surrounding 2-3 functions below and above.

Compiler still doesn't like something.

It's better when compiler fails with errors than when game says "you are using the null pointer let me close NOW"
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Sat Nov 14, 2015 12:42 am

Sent to you via PM nakti. c:

I know Cent, I don't get it xD there's something missing if it's erroring, I know that much at least.
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Sun Nov 15, 2015 1:25 am

Okay, I was able to fix the issue (thanks nakti) but there's one last issue coming up now: If someone else tames the critter, it still comes up as 'Tame ____' on the button even if I restart or dim hop. The button doesn't actually do anything though.
Back to top Go down
Nakti
®
®
avatar

Game username : Nakti
Server : World of Pandora
Female Posts : 163
Join date : 2012-08-24
Age : 22
Location : black celebration

PostSubject: Re: Taming a critter with a button code help   Sun Nov 15, 2015 5:57 pm

Try using mNetworkManager->sendCritterTamed(tCritter->getID()); instead of mNetworkManager->tameKitten(tCritter->getID()); (or any other tame codes).
Just for an experiment.

Do you have anything in chat when you tame an animal?
Back to top Go down
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Sun Nov 15, 2015 11:17 pm

It just says 'tamed ___' when I tame it, I took your advice and fixed the issue where it says that I already have a pet. Now the button just says 'tame ___' after someone else tames it. The button doesn't do anything.
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 471
Join date : 2014-02-09
Age : 19

PostSubject: Re: Taming a critter with a button code help   Mon Nov 16, 2015 12:52 am

where do you have the button set in gui? it shouldn't be in the getIsPet section, or it'll show if the critter is already tamed. it should be under //critter commands

________________________________
i can code you things
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Mon Nov 16, 2015 1:25 am

It is, here's my code with the //pet commands section above it for reference:
Code:
//Pet commands
               if(tCritter->getIsPet() && tCritter->imTheOwner())
               {
                  const PetFlags *tFlags = mUnitManager->getPlayer()->getPetFlags();
                  mButtonText[BUTTON_SELECTBOX1]->setCaption("Pet");
                  mButtonText[BUTTON_SELECTBOX2]->setCaption(tFlags->stay?"Follow":"Stay");
                  mButtonText[BUTTON_SELECTBOX3]->setCaption(tFlags->shrink?"Grow":"Shrink");
                  if(tCritter->getCritterType()=="Manta")mButtonText[BUTTON_SELECTBOX4]->setCaption(tFlags->shrink?"Devolve":"Evolve");
                  else mButtonText[BUTTON_SELECTBOX4]->setCaption("");
               }
               //Critter commands
               else if(tCritter->getCritterType() == "Pet Rock")
               {
                  mButtonText[BUTTON_SELECTBOX1]->setCaption("Tame Pet Rock");
                  mButtonText[BUTTON_SELECTBOX2]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX3]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX4]->setCaption("");
               }
               else if(tCritter->getCritterType() == "Duckling")
               {
                  mButtonText[BUTTON_SELECTBOX1]->setCaption("Tame Duckling");
                  mButtonText[BUTTON_SELECTBOX2]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX3]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX4]->setCaption("");
               }
               else if(tCritter->getCritterType() == "Mitzi")
               {
                  mButtonText[BUTTON_SELECTBOX1]->setCaption("Tame Mitzi");
                  mButtonText[BUTTON_SELECTBOX2]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX3]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX4]->setCaption("");
               }
               else if(tCritter->getCritterType() == "Kitten")
               {
                  mButtonText[BUTTON_SELECTBOX1]->setCaption("Tame Kitten");
                  mButtonText[BUTTON_SELECTBOX2]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX3]->setCaption("");
                  mButtonText[BUTTON_SELECTBOX4]->setCaption("");
               }

And nakti, if you replaced 'tame___' with 'sendCritterTamed' would there be another way for the game to see which critters are supposed to have the button if it goes by the definitions? Since then each one would say 'sendCritterTamed' and there's no way of defining which critter is tamed. xD
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 471
Join date : 2014-02-09
Age : 19

PostSubject: Re: Taming a critter with a button code help   Mon Nov 16, 2015 1:33 am

ah, there's your problem. you need it to say

Code:
else if(tCritter->getCritterType() == "whatever" && !tCritter->getIsPet())

________________________________
i can code you things
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Taming a critter with a button code help   Mon Nov 16, 2015 1:57 am

That fixed it, thank you Hyper!
Back to top Go down
 
Taming a critter with a button code help
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support-
Jump to: