OneVsOne Plugin for 2.4.x
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
OneVsOne Plugin for 2.4.x
I'm trying to host a private OneVsOne server for some tourneys, and I'd really like the plugin that is on many of the public 1vs1 servers. I don't care about reporting matches, ZELO scores, but I would like to be able to have the plugin keep score, and record the matches. (through the "/ovso match official" command)
I have downloaded catay's OneVsOne from here: https://github.com/catay/OneVsOne But, the .cpp file hasn't been updated in 3 years, and won't work with 2.4.x.
SO, can someone please get me the current OneVsOne plugin, compiled or source? (I'm running Ubuntu Server 12.04) I suppose updating https://github.com/catay/OneVsOne/blob/ ... eVsOne.cpp to work with 2.4.x would suffice however, but whichever is easiest, THANKS!
I have downloaded catay's OneVsOne from here: https://github.com/catay/OneVsOne But, the .cpp file hasn't been updated in 3 years, and won't work with 2.4.x.
SO, can someone please get me the current OneVsOne plugin, compiled or source? (I'm running Ubuntu Server 12.04) I suppose updating https://github.com/catay/OneVsOne/blob/ ... eVsOne.cpp to work with 2.4.x would suffice however, but whichever is easiest, THANKS!
---mr64bit
Re: OneVsOne Plugin for 2.4.x
https://github.com/catay/OneVsOne is the correct source repository. As you might know git allows different branches. The one you are looking for is 2.4_compat.
(If you want to view the files via web-browser you can use https://github.com/catay/OneVsOne/tree/2.4_compat )
First, check for existing 2.4_compat branch by listing all branches:
Then, switch to branch mentioned above:
Tattaa...done... :)
(If you want to view the files via web-browser you can use https://github.com/catay/OneVsOne/tree/2.4_compat )
First, check for existing 2.4_compat branch by listing all branches:
Code: Select all
git branch -a
Code: Select all
git checkout 2.4_compat
A pessimist is an optimist with experience... ;o)
Re: OneVsOne Plugin for 2.4.x
It's too bad it wasn't done the other way around (with a 2.0_compat and then with the master targeting the current release).
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
Re: OneVsOne Plugin for 2.4.x
Thanks a lot! I will try that.strayer wrote:Tattaa...done...
That's what I was thinking too. I haven't used github all that much, and I assumed that "Branches" would be, well, branches of the main code, not updates to it.blast wrote:It's too bad it wasn't done the other way around (with a 2.0_compat and then with the master targeting the current release).
---mr64bit
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
Re: OneVsOne Plugin for 2.4.x
Ok, got the 2.4_compat branch, tried it. It compiles fine, but when I try to load it, I get this (-ddd):
One a somewhat related note, does anyone know where I can find a 2.4.x compatible oneOnOneRules plugin? I got an old one from here, but that was 2006. It compiles fine, but when I try to load it, I get
Any more help will be greatly appreciated!
Code: Select all
2012-08-04 18:39:03: Plugin: /usr/local/lib/bzflag/OneVsOne.so not found, error /usr/local/lib/bzflag/OneVsOne.so: undefined symbol: _ZTV14BaseUrlHandler
2012-08-04 18:39:03: WARNING: unable to load the plugin; /usr/local/lib/bzflag/OneVsOne.so
Code: Select all
2012-08-04 18:39:03: Plugin: /usr/local/lib/bzflag/oneOnOneRules.so found but does not contain bz_GetPlugin method, error /usr/local/lib/bzflag/oneOnOneRules.so: undefined symbol: bz_GetPlugin
---mr64bit
Re: OneVsOne Plugin for 2.4.x
Is your bzfs and OneVsOne plugin from the same build of the source?
And as for the oneOnOneRules plugin, that should not have compiled on 2.4, unless perhaps you put the bzfsAPI.h file in the directory as well. If you did, don't. You need to actually upgrade the plugin.
And as for the oneOnOneRules plugin, that should not have compiled on 2.4, unless perhaps you put the bzfsAPI.h file in the directory as well. If you did, don't. You need to actually upgrade the plugin.
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
Re: OneVsOne Plugin for 2.4.x
I'm not sure what you mean. I compiled them together, I have the latest SVN trunk source of bzfs, and I got the OneVsOne source from the 2.4_compat branch above.blast wrote:Is your bzfs and OneVsOne plugin from the same build of the source?
I can go without the oneOnOneRules plugin for now, but I would really like to get this one working.
---mr64bit
Re: OneVsOne Plugin for 2.4.x
OneVsOne - 2.4_compat
Your error message is telling you everything you need to know. The library file ("OneVsOne.so") is not where it should be. You can either place the file in the correct folder (e.g. "/usr/local/lib/bzflag/" as shown in the error message) or you specify the correct name and path (e.g. "bzfs -loadplugin /home/mr64bit/opt/bzflag_2.4.2/lib/bzflag/OneVsOne.so").
That's all written down in the README.txt file.
Your error message is telling you everything you need to know. The library file ("OneVsOne.so") is not where it should be. You can either place the file in the correct folder (e.g. "/usr/local/lib/bzflag/" as shown in the error message) or you specify the correct name and path (e.g. "bzfs -loadplugin /home/mr64bit/opt/bzflag_2.4.2/lib/bzflag/OneVsOne.so").
That's all written down in the README.txt file.
A pessimist is an optimist with experience... ;o)
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
Re: OneVsOne Plugin for 2.4.x
The exact command I am using is
which is where all my plugins are located after I "sudo make install". I can load any other plugin (except for oneOnOneRules, but that's a different matter) by using this line with the correct plugin name.
Could it be that not all of my -loadplugin commands are not next to each other in my config file?
(it kinda looks like this)
Code: Select all
-loadplugin /usr/local/lib/bzflag/OneVsOne.so
Could it be that not all of my -loadplugin commands are not next to each other in my config file?
(it kinda looks like this)
Code: Select all
#####################################################################
#######################Global Settings
#####################################################################
-loadplugin /usr/local/lib/bzflag/logDetail.so
-loadplugin /usr/local/lib/bzflag/chathistory.so,1000
-loadplugin /usr/local/lib/bzflag/playHistoryTracker.so
-loadplugin /usr/local/lib/bzflag/bigbrother.so,/home/bzflag/bzflag_stuff/bigbro.cfg
-loadplugin /usr/local/lib/bzflag/sayFTwelve.so
#other stuff#
#####################################################################
########################Per Map Settings
#####################################################################
-loadplugin /usr/local/lib/bzflag/OneVsOne.so,/home/bzflag/bzflag_stuff/qs_1vs1/noflags.ini
-loadplugin /usr/local/lib/bzflag/oneOnOneRules.so
#some more stuff#
---mr64bit
Re: OneVsOne Plugin for 2.4.x
From the source directory, try this: src/bzfs/bzfs -dddd -loadplugin plugins/OneVsOne/.libs/OneVsOne.so
Also, ensure that the OneVsOne.so file exists in plugins/OneVsOne/.libs/
Also, ensure that the OneVsOne.so file exists in plugins/OneVsOne/.libs/
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
Re: OneVsOne Plugin for 2.4.x
Did exactly that.
If it helps, here is what's in the /plugins/OneVsOne/ folder
Also, the string "_ZTV14BaseUrlHandler" is found in "/.libs/OneVsOne.so", and "/.libs/OneVsOne_la-OneVsOne.o"
Thank you all for the help!
Code: Select all
Plugin: plugins/OneVsOne/.libs/OneVsOne.so not found, error plugins/OneVsOne/.libs/OneVsOne.so: undefined symbol: _ZTV14BaseUrlHandler
WARNING: unable to load the plugin; plugins/OneVsOne/.libs/OneVsOne.so
Code: Select all
examples Makefile.am OneVsOne_la-OneVsOne.lo UrlHandler.cpp
INIParser.cpp Makefile.in OneVsOne_la-OneVsOne.o UrlHandler.h
INIParser.h OneVsOne.cpp OneVsOne.sln
LICENSE OneVsOne.def OneVsOne.vcxproj
Makefile OneVsOne.la README.txt
Thank you all for the help!
---mr64bit
- Bullet Catcher
- Captain
- Posts: 564
- Joined: Sat Dec 23, 2006 7:56 am
- Location: Escondido, California
Re: OneVsOne Plugin for 2.4.x
It looks like you need to replace BaseUrlHandler with bz_BaseURLHandler in the source code and recompile.
-
- Private First Class
- Posts: 89
- Joined: Fri May 06, 2011 4:58 pm
- Location: Hang on, let me get a map...
- Contact:
Re: OneVsOne Plugin for 2.4.x
Nope, no good. I replaced "BaseUrlHandler" with "bz_BaseURLHandler" in OneVsOne.cpp, then it wouldn't compile. I replaced the same string in UrlHandler.cpp and UrlHandler.h, still no luck. Now I get this when I compile.
Is there something else I need to change? or was I better off before?
Code: Select all
In file included from OneVsOne.cpp:12:0:
UrlHandler.h:14:7: error: redefinition of 'class bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: error: previous definition of 'class bz_BaseURLHandler'
OneVsOne.cpp:92:23: error: cannot declare field 'OneVsOne::playerInfoHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: because the following virtual functions are pure within 'bz_BaseURLHandler':
../../include/bzfsAPI.h:1563:16: note: virtual void bz_BaseURLHandler::URLDone(const char*, void*, unsigned int, bool)
OneVsOne.cpp:93:23: error: cannot declare field 'OneVsOne::topScoreHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: since type 'bz_BaseURLHandler' has pure virtual functions
OneVsOne.cpp:94:23: error: cannot declare field 'OneVsOne::topZeloHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: since type 'bz_BaseURLHandler' has pure virtual functions
OneVsOne.cpp:95:23: error: cannot declare field 'OneVsOne::registerHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: since type 'bz_BaseURLHandler' has pure virtual functions
OneVsOne.cpp:96:23: error: cannot declare field 'OneVsOne::reportHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: since type 'bz_BaseURLHandler' has pure virtual functions
OneVsOne.cpp:97:23: error: cannot declare field 'OneVsOne::motdHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: since type 'bz_BaseURLHandler' has pure virtual functions
OneVsOne.cpp:98:23: error: cannot declare field 'OneVsOne::welcomeMessageHandler' to be of abstract type 'bz_BaseURLHandler'
../../include/bzfsAPI.h:1558:7: note: since type 'bz_BaseURLHandler' has pure virtual functions
OneVsOne.cpp: In constructor 'OneVsOne::OneVsOne()':
OneVsOne.cpp:161:15: error: 'class bz_BaseURLHandler' has no member named 'setNoNoKNotify'
OneVsOne.cpp: In member function 'void OneVsOne::registerPlayer(int, bz_APIStringList*)':
OneVsOne.cpp:274:23: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp: In member function 'void OneVsOne::getPlayerInfo(int, bz_APIStringList*)':
OneVsOne.cpp:296:23: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp: In member function 'void OneVsOne::getTopScore(int, bz_APIStringList*)':
OneVsOne.cpp:320:21: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp: In member function 'void OneVsOne::getTopZelo(int, bz_APIStringList*)':
OneVsOne.cpp:343:20: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp: In member function 'void OneVsOne::handleMotd(int, bz_APIStringList*)':
OneVsOne.cpp:450:17: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp: In member function 'void OneVsOne::showMotdBanner(int, bool)':
OneVsOne.cpp:652:17: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp:656:20: error: 'class bz_BaseURLHandler' has no member named 'showData'
OneVsOne.cpp: In member function 'void OneVsOne::showWelcomeMessage(int, bool)':
OneVsOne.cpp:664:27: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
OneVsOne.cpp:668:30: error: 'class bz_BaseURLHandler' has no member named 'showData'
OneVsOne.cpp: In member function 'void OneVsOne::logRecordMatch(std::string, int, int)':
OneVsOne.cpp:739:19: error: 'class bz_BaseURLHandler' has no member named 'setPlayerId'
---mr64bit
Re: OneVsOne Plugin for 2.4.x
You should not be defining bz_BaseURLHandler you should be deriving from it.
Other then an error in BaseUrlHandler::setNoNoKNotify(bool notify) not returning a value the code from Catay's 2.4 tree should compile and link fine on linux if you are using the correct headers and runtimes.
On windows not so much.
Other then an error in BaseUrlHandler::setNoNoKNotify(bool notify) not returning a value the code from Catay's 2.4 tree should compile and link fine on linux if you are using the correct headers and runtimes.
On windows not so much.
JeffM
Re: OneVsOne Plugin for 2.4.x
Here is a fixed version of the plugin that works on windows and linux, and follows our current build system. It builds and loads fine with no code modification in the current release.
Please note that you need to add this to the build files for an existing install if you use the command line build like we do for all plugins based on the samples.
1) add OneVsOne to the plugins dir
2) edit plugins/makefile.am and add the OneVsOne folder to the list of pluigns
3) edit config.ac in the root and add plugins/OneVsOne/Makefile to the list of plugins near the bottom.
Run ./configure from the command line on the root, then make. This will build OneVsOne with the other plugins.
Please note that you need to add this to the build files for an existing install if you use the command line build like we do for all plugins based on the samples.
1) add OneVsOne to the plugins dir
2) edit plugins/makefile.am and add the OneVsOne folder to the list of pluigns
3) edit config.ac in the root and add plugins/OneVsOne/Makefile to the list of plugins near the bottom.
Run ./configure from the command line on the root, then make. This will build OneVsOne with the other plugins.
- Attachments
-
- OneVsOne.zip
- Fixed plugin
- (28.74 KiB) Downloaded 280 times
JeffM