You are not logged in.
- Forum Index
- » Battlefield 2142
- » How to query for active servers, and player info on them
#51 22 Aug 2007 11:53 am
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
i have uploaded a new version,
$m[1]www.crbf-team.com/software/bf2142stats/app2_0_7_3.rar
this one should work for you, if not let me know.
Offline
#53 23 Aug 2007 5:14 pm
Re: How to query for active servers, and player info on them
that works. I came across this message though:
Error showed up on section 9 of ReadPlayerInfo section
Object reference not set to an instance of an object.
at BF2142_Stats.FrmPlayerStats.ReadPlayerInfo()
O
H pid nick tid asof
D 81246737 MadHatter2142 0 1187914355
H mtt-0-3 mtt-0-4 mtt-0-5 mtt-0-6 mtt-0-7 mtt-0-8 mtt-0-9 mwin-0-3 mwin-0-4 mwin-0-5 mwin-0-6 mwin-0-7 mwin-0-8 mwin-0-9 mlos-0-3 mlos-0-4 mlos-0-5 mlos-0-6 mlos-0-7 mlos-0-8 mlos-0-9 mbr-0-3 mbr-0-4 mbr-0-5 mbr-0-6 mbr-0-7 mbr-0-8 mbr-0-9 msc-0-3 msc-0-4 msc-0-5 msc-0-6 msc-0-7 msc-0-8 msc-0-9
D 2473 1340 955 7185 3330 644 753 3 1 1 6 3 0 0 0 1 0 7 3 2 2 21 9 7 20 25 5 4 41 11 7 81 61 7 5
H mtt-1-0 mtt-1-1 mtt-1-2 mtt-1-3 mtt-1-5 mtt-1-10 mtt-1-12 mtt-1-14 mwin-1-0 mwin-1-1 mwin-1-2 mwin-1-3 mwin-1-5 mwin-1-10 mwin-1-12 mwin-1-14 mlos-1-0 mlos-1-1 mlos-1-2 mlos-1-3 mlos-1-5 mlos-1-10 mlos-1-12 mlos-1-14 mbr-1-0 mbr-1-1 mbr-1-2 mbr-1-3 mbr-1-5 mbr-1-10 mbr-1-12 mbr-1-14 msc-1-0 msc-1-1 msc-1-2 msc-1-3 msc-1-5 msc-1-10 msc-1-12 msc-1-14
D 170903 142778 171725 144524 144726 12983 7498 2625 68 63 74 67 62 6 4 3 70 57 68 63 64 9 5 1 88 101 72 78 103 45 40 16 4181 3090 3452 3382 3403 221 154 35
H mtt-2-10 mtt-2-11 mtt-2-12 mwin-2-10 mwin-2-11 mwin-2-12 mlos-2-10 mlos-2-11 mlos-2-12 mbr-2-10 mbr-2-11 mbr-2-12 msc-2-10 msc-2-11 msc-2-12
D 4788 11767 5051 4 6 3 2 5 0 29 88 56 54 215 90
$ 958 $
Offline
#54 26 Aug 2007 1:19 pm
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
hmmm... seems to be that your user has some unexpected set of events there. After taking a detailed look at them, it seems that you have reference to map # 14, im guessing thats Highway Tampa. Im going to fix it on monday and put a new version up.
If you want to fix it yourself, you can go to the install directory listed on the about form on the app. then look for the database, open it, look for a table called maps, and just add 14, Highway tampa.
Its funny since there is no map # 13... i wonder whats thats hole for?, but after looking at Dice games, there are lots of holes everywhere... so nothing to be stranged by.
Thanks for the info.
Offline
#55 06 Sep 2007 2:46 pm
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
just to put an update here,
Im currently developing a custom updater for the program. It has 3 phases, database updates, images updates, and application updates.
Application updates has it all, but ill keep those to the minimal, since it will overwrite all info, but will include the other updates. It downloads a new version of the program if any, and will run the installer
Database updates only download a flat file on the server and updates the tables.
Images updates, only download the images from the server and puts them on the corresponding folder.
This way i dont have install a new version everytime i have an error, and since from now on most of the errors could be missing files or info on the database, it should work just fine. With this app, i have learn to download files from FTP and Web addresses, and have a segmented downloads to track downloading proccess.
Ill post the new link to the application, and from this version on, there should be no more need to download a version from a link ever again, just click check for updates, and if any, just click update.... Cool huh!!
Offline
#56 06 Sep 2007 2:58 pm
Re: How to query for active servers, and player info on them
excellent! I wrote an FTP client (a library, not a fully blown GUI) a few months back (I can't stand the FtpWebRequest/Response object built into .NET). updater apps are cool.
Offline
#57 06 Sep 2007 9:04 pm
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
here is the file
$m[1]www.crbf-team.com/software/bf2142stats/ … _1_0_0.rar
And well, i did used the ftpwebrequest object (its more secure and reliable than the webrequest, and the httpweb request object, which i did try too), but i wanted to keep it simple there (not quite a pro on this programing stuff like you are, but i try my best). The only thing missing now its the ability to find if a player is online... but i havent figured that out, since there aint much info about it online.
Offline
#58 13 Sep 2007 3:04 pm
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
Well currently what im doing is spliting up the app into dinamicaly loaded Dlls, this to easy up the updating procedure (and to learn about dlls a bit), the only problem is that once a form is closed, the dlls is still loaded, lol, so i still have to figure out how to remove them from memory if they are not beeing used, the good thing is that i preatty much have one form per dll (sometimes 2, depending on the hierarchy of the processes).
Once i have this done ill release an update on the previews updater that will preatty much change the whole file and process structure of the current app (its getting better by the day), i know im not adding much functionality to it, but im learning lots and lots every day.
Offline
#59 03 Oct 2007 1:19 pm
Re: How to query for active servers, and player info on them
.net doesn't allow you to unload dll's from the app domain. in order to unload assemblies (dll's) you have to create a new appdomain, load the assembly into that app domain, create a management api that allows you to invoke code from the other assembly and use its result (it uses remoting behind the scenes to do this) and when needed, unload the entire app domain (which will unload the assemblies). Being able to parent up a window from one app domain into the message queue of a window in another is pretty much impossible from what I've been able to see (and believe me, I've done quite a bit of extensive research and development in that department).
I wrote an article on the late bound assembly loading (and subsequent use of reflection involved), but haven't published much on general plug in frameworks (though I have built extensive frameworks that allows you to load / unload assemblies externally to a running application at runtime, and allows you to insert, initialize and use any class as a "plug-in" like feature without a common API interface to do so). I only develop in C# though, so I don't know how much you'd enjoy it.
Offline
#60 08 Oct 2007 8:59 am
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
well i have managed to figure out what i needed, and done a twist to the problem.
Im preatty much cheating on the program, to tell him on dev env that the dll will be there but on instalation the dll are not included on the main folder. Thus the program wont find them, i have set an event on the "i didnt find the dll you stupid idiot, where the hell is it" app method and just load it with reflection from the folder i have. But i load them as a new file in the app, leaving the dll free to be replaced or removed. This way, i could even have the dlls on my web server and make the app load them from there... but i just wanted to keep it simple, and include them with the instalation, and if there is any one new, it will download it an replace it even if its using it. The only downside is that the user will need to reload the app for it to use the new dll, but i think thats a minor issue.
The last link for the app is here. $m[1]www.crbf-team.com/software/bf2142stats/v2/Release.rar
Offline
#61 08 Oct 2007 11:03 am
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
by the way... on the dll you gave me you used this code
Assembly.GetExecutingAssembly().Location
to check for the loaction of the dll, and use that location to write the included gslist file, but since the dll is now on memory this line gives me an error, so whats the equivalent for
My.Application.Info.DirectoryPath (used on vb) on c++?
This line will give me the app folder name even if the dll is loaded on memory, but i cant seen to find it on c++, any ideas?
Offline
#62 08 Oct 2007 9:22 pm
Re: How to query for active servers, and player info on them
what I don't understand is that My.Application.Info returns the currently executing assembly which is the same thing Assembly.GetExecutingAssembly does. The DirectoryPath property simply passes the assembly.Location to Path.GetDirectoryName and returns the string. Why one returns the correct path and the other doesn't / won't is beyond me... unless you're not adding the Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) in its entirety. unless you're doing an assembly load by reading the file into a byte array and passing that byte array to the assembly.load function, you should have the path location of the assembly.
the whole My.Whatever is a convention of VB in which visual studio actually generates a bunch of stuff representing the project, application, computer, and so on. thats why you won't see it in C++ or C#.
Offline
#63 10 Oct 2007 3:19 pm
- winsr
- Extreme Member
- Registered: Mar 2007
- Posts: 90
Re: How to query for active servers, and player info on them
well thats the hole weird thing, i am in deed loading the assembly as a binary array, but the weird thing is that im loading all my dlls that way, to prevent file lock, and it only fails in yours lol... but i have managed to fix that by changing your dll a little bit and make it accept a new parameter that is the file location, and then using it to create the gslist file with it, insted of the assembly location. So now its working fine, you can reuse the link i gave 4 post ago to download the new version or try the update option (i know it gives an error at the end of the update, but it fixed with a new update that its already up) So just click update untill there are no more updates.
Offline
- Forum Index
- » Battlefield 2142
- » How to query for active servers, and player info on them