Sometimes i get 128 (the 7. bit) in the Rules and i didnt found anything here or some updates...
Sometimes i get more Racer then the Number in NROFRACERS.. I check the my Buffer for a valid version-string and sometimes i must skip 48 or 72 bytes for the next valid server. then i look in the hexdump and found 3 racers...
All I can say about that at the moment is that it's very strange. In my code i create the NROFRACERS and the whole 'string' of racers at the same time. Every time I append a racer, I increase NROFRACERS by 1, so I don't really see how that could've gone wrong.
So I don't know atm.
No problem, only want to share my results in last days of coding.. You can see youself that the NORACER is 0x0a (10) and you see 13 Racers in the Block.. It happen only 1 or 2 times in 20 trys...
EDIT: I dont use the SDK, my script isnt written in php.. Its written in Tcl for more multiplatform use.
PHP do not distribute UNIX/Linux binaries. Most Linux distributions come with PHP these days, so if you do not want to compile your own, go to your distribution's download site. Binaries available on external servers:
This bit of SQL voodoo queries my DB which holds (at present 3447) host records retrieved in the last 24 hours to try and find ones where the NORACERS is different to the actual racer count. There are that many because the table is simply appended to everytime a host changes.
mysql> SELECT strippedHostName -> FROM ( -> SELECT -> strippedHostName, -> players, -> LENGTH(REPLACE(racers, ',', '')) AS replaced, -> LENGTH(racers) AS original, -> IF(LENGTH(racers) != 0, 1, 0) AS hasPlayers FROM as2f) -> AS racerTbl -> WHERE -> hasPlayers = 1 -> AND (original - replaced) + 1 != players; Empty set (0.01 sec)
And here is the result if I invert the last check
mysql> SELECT strippedHostName -> FROM ( -> SELECT -> strippedHostName, -> players, -> LENGTH(REPLACE(racers, ',', '')) AS replaced, -> LENGTH(racers) AS original, -> IF(LENGTH(racers) != 0, 1, 0) AS hasPlayers FROM as2f) -> AS racerTbl -> WHERE -> hasPlayers = 1 -> AND (original - replaced) + 1 = players; +-------------------------------+ | strippedHostName | +-------------------------------+ | (=VR=)-VITEX-RACING | | bigbry's drag | | Billy | | GSA-XGN OzBee-R | | GSA-XGN XRT | | Internode LFS #1 | | Ka-Tet | | LFS Norge | | Wine doch nicht | | XyOn-Servers.com | LFS S1Test | | =[ZG]=Racing Team 2 | | (FM) OvaL JuNkIeS ! | | 6TraxGTRLeague.tk | | F3 Euro series | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | ^JÉÏedline ^JÉÏacing | | Caribbean Cruise 1 by CLC | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | [TW] The Wags | | iiNetAutoX[Drift] | | ProRacingRoom#1 | | STCC 1a New & Bronze | | STCC 2 Public Silver & Gold | | STCC 3b Event 2 Silver & Up | | TEAMD1 Drift Server #2 | | (=VR=)-VITEX-RACING | | cz-závody | | geo | | Internode LFS #1 | | LFS Norge | | TEAM LiNe | | testtest | | tom´s Fun server | | =[ZG]=Racing Team 2 | | FPR | Publicserver#2 | | KY_OVALek | | MecaHost-[FB] Team | | (FM) OvaL JuNkIeS ! | | F3 Euro series | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | ^JÉÏedline ^JÉÏacing | | di.racing Publicserver | | Caribbean Cruise 1 by CLC | | CURURU GT | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | burnoutcrew.net #3 | | burnoutcrew.net #CL | | cP Clownpaint.com #2 | | FRH FUN TIME(jump) | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | GromNet & Serbian Racing Team | | n!faculty PUB | | ProRacingRoom#1 | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | [SKH]FairPlay #1 | | (=VR=)-VITEX-RACING | | cz-závody | | Drive It Like You Stole It | | geo | | Internode LFS #1 | | LFS Norge | | Serveur R - Race | | TEAM LiNe | | testtest | | tom´s Fun server | | =[ZG]=Racing Team 2 | | FPR | Publicserver#2 | | KY_OVALek | | MecaHost-[FB] Team | | (FM) OvaL JuNkIeS ! | | F3 Euro series | | liveforspeed.HU S2 B | | Tenwierdufos Jump Server | | [TC] CityDriving Jamaica | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | ^JÉÏedline ^JÉÏacing | | di.racing Publicserver | | Caribbean Cruise 1 by CLC | | CURURU GT | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | burnoutcrew.net #2 | | burnoutcrew.net #3 | | burnoutcrew.net #CL | | cP Clownpaint.com #2 | | CZECH FUN SERVER | | RR|Stock Cup | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | GromNet & Serbian Racing Team | | n!faculty PUB | | ProRacingRoom#1 | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | [SKH]FairPlay #1 | | ^JÁÑ Public Drift | | (=VR=)-VITEX-RACING | | cz-závody | | Drive It Like You Stole It | | geo | | Internode LFS #1 | | LFS Norge | | TEAM LiNe | | testtest | | tom´s Fun server | | =[ZG]=Racing Team 2 | | KY_OVALek | | MecaHost-[FB] Team | | (FM) OvaL JuNkIeS ! | | F3 Euro series | | FIB Racing-practice | | liveforspeed.HU S2 B | | [TC] CityDriving Jamaica | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | ^JÉÏedline ^JÉÏacing | | di.racing Publicserver | | Caribbean Cruise 1 by CLC | | CURURU GT | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | burnoutcrew.net #3 | | cP Clownpaint.com #2 | | CZECH FUN SERVER | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | GromNet & Serbian Racing Team | | n!faculty PUB | | ProRacingRoom#1 | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | STCC 3b Event 2 Silver & Up | | [SKH]FairPlay #1 | | [ISR] S2 Server | | (=VR=)-VITEX-RACING | | aaa | | bigbry's drag | | cz-závody | | geo | | koprivnica | | LFS Norge | | TEAM LiNe | | testtest | | tom´s Fun server | | =[ZG]=Racing Team 2 | | HOR Heroes of Racing | | (FM) OvaL JuNkIeS ! | | CDT-DRIFTING-Cz | | FIB Racing-practice | | liveforspeed.HU S2 B | | [TC] City Driving UK | | [TC] CityDriving Jamaica | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | ^JÉÏedline ^JÉÏacing | | :: Bremskiller.de Intern | | Caribbean Cruise 1 by CLC | | CURURU GT | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | burnoutcrew.net #3 | | cP Clownpaint.com #2 | | CZECH FUN SERVER | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | GromNet & Serbian Racing Team | | n!faculty PUB | | ProRacingRoom#1 | | SimRacingPL-Polska Liga LFS | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | STCC 3b Event 2 Silver & Up | | Zone30 Training | | [SKH]FairPlay #1 | | (=VR=)-VITEX-RACING | | aaa | | cz-závody | | geo | | LFS Norge | | pure drag no messin | | TEAM LiNe | | testtest | | tom´s Fun server | | HOR Heroes of Racing | | (FM) OvaL JuNkIeS ! | | CDT-DRIFTING-Cz | | FIB Racing-practice | | liveforspeed.HU S2 B | | [TC] City Driving UK | | [TC] CityDriving Jamaica | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | ^JÉÏedline ^JÉÏacing | | Caribbean Cruise 1 by CLC | | CURURU GT | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | #LiveForSpeed UOL-2 LFSBR s2# | | burnoutcrew.net #3 | | cP Clownpaint.com #2 | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | GromNet & Serbian Racing Team | | n!faculty PUB | | ProRacingRoom#1 | | SimRacingPL-Polska Liga LFS | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | STCC 3b Event 2 Silver & Up | | Zone30 Training | | [SKH]FairPlay #1 | | [ISR] S2 Server | | (=VR=)-VITEX-RACING | | 2FT LFSLA.NET CEROLAG.COM | | Benny | | cz-závody | | geo | | LFS Norge | | LFS Norge Drifting | | Swain - Drift2 | | TEAM LiNe | | testtest | | tom´s Fun server | | =[ZG]=Racing Team 2 | | MecaHost-[FB] Team | | (FM) OvaL JuNkIeS ! | | =BTU= Motorsports | | liveforspeed.HU S2 B | | [TC] City Driving UK | | [TC] CityDriving Jamaica | | [TC] CityDriving USA | | [KiT]FOX Racing server | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | bioXar^vRacing #2 | | Venus Clean Racers | | Caribbean Cruise 1 by CLC | | CURURU GT | | dSk|Motodrom | | Strandstuermer.com @ LFS | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | burnoutcrew.net #3 | | cP Clownpaint.com #2 | | Racing by #4u.GaminG | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | >>>>ORC Bangers<<<< | | ANTIK Drift Challenge | | GromNet & Serbian Racing Team | | liveforspeed.se Drift | | n!faculty PUB | | ProRacingRoom#1 | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | STCC 3b Event 2 Silver & Up | | [SKH]FairPlay #1 | | (=VR=)-VITEX-RACING | | 2FT LFSLA.NET CEROLAG.COM | | cz-závody | | geo | | Internode LFS #1 | | LFS Norge | | LFS Norge Drifting | | Swain - Drift2 | | TEAM LiNe | | testtest | | =[ZG]=Racing Team 2 | | MecaHost-[FB] Team | | (FM) OvaL JuNkIeS ! | | =BTU= Motorsports | | liveforspeed.HU S2 B | | [TC] City Driving UK | | [TC] CityDriving Jamaica | | [TC] CityDriving USA | | [CD] ConeDodgersRacing1 | | ^JÉÏedline ^JÉÏacing 2 | | bioXar^vRacing #2 | | Venus Clean Racers | | Caribbean Cruise 1 by CLC | | CURURU GT | | dSk|Motodrom | | Strandstuermer.com @ LFS | | TeW Team Weizen #4 | | [MPR] S2 Race Server 2 | | burnoutcrew.net #3 | | cP Clownpaint.com #2 | | Racing by #4u.GaminG | | [WHRT] S2 Server | | iiNetAutoX[Drift] | | >>>>ORC Bangers<<<< | | ANTIK Drift Challenge | | ANTIK FOX Racing | | GromNet & Serbian Racing Team | | liveforspeed.se Drift | | n!faculty PUB | | ProRacingRoom#1 | | STCC 1a New & Bronze | | STCC 1b New & Bronze | | STCC 2 Public Silver & Gold | | STCC 3b Event 2 Silver & Up | | [SKH]FairPlay #1 | +-------------------------------+ 321 rows in set (0.01 sec)
But a platform isnt allways an OS.. I use it everytime on the same OS but different contexts.. My script is running on http-enviroment, in an irc-/eggdrop-enviroment and on shell..
I have no idea, why everyone wants to push my to php, i use this script language since more then 5 years and i have written scripts before php was popular for grand prix legends.. :-)
EDIT: Victor, i start to write a logfile how often i get this error and do more checks, but then the error must be external in my http package or something (i have only the idea, that the http package replace the newline char from CR to LF, that would explain why 0x0a is on the places where 0x0d should be.. I try to check this..).. i dont change anything in the data that i get on "?action=hosts".. i use the first 53 bytes and calculate the pointer for how long is the next block for racers / the next host...
Should be easy enough to check if that character is indeed replaced, by looking at other values in the entire block of data that pubstat returns. If you check in the evening when there are many people only and many occupied hosts, there should be more hosts with 0x0d people online - these should then also appear wrong in your script. And if you catch an error when it happens (you see it happen), you can manually check the racers on the host at lfs world.
But that there's a layer between the network and your script that changes something in the data makes the most sense to me atm. Worth checking that. Maybe you can run a simple data comparer where you grab the data with another programming / scripting language simulateously with the tcl version.
(i split off this topic, to keep the main thread tidy)
If it is an LR/CF issue, try setting a binary flag in the transfer mode. I won't pretend to know even the faintest about Tcl but I know that PHP on Windows can have similar issues if you don't tell the fopen call that the data should be treated as binary.