Did you open a DOS prompt and then type the command? or did you just double-click the binary? I suspect the latter as it contains no code to close the console.. if so, this won't work, it's not a GUI app and requires keyboard input.
That's even more strange as I definitely detect it correctly as 'XRGT' (or 'XR GT' before I strip the spaces).
I've added checking for this now and fixed the above bug that AP has pointed out to me.
At least now there should be no actual _problems_ when running it.. but still not entirely sure why the XRG fails
If you have a backup of your settings dir ND, could you perhaps restore that and try the updated version I've uploaded to post #1 and let me know if for some reason, this update has fixed that issue too? If so and it still errors, it'll display: 'ERROR: COULD NOT GET CAR CODE FOR $carName' and skip that file.
Thanks. My BMW Sauber ones renamed no problem.. that said, AFAIK, all cars have a '_race_s.set' setup file.. all of which appear to have been copied ok for me.
FBMW should be unaffected, as X10 didn't have any FBMW setups (I haven't accounted for this car at all).
Thanks ND.. that definitely confirms a car code error. I don't suppose you happen to know what car it was originally meant for do you? This'd really help me pinpoint the error.
Can you copy / paste the few lines above the error line too please? I think I've got a car name wrong in the lookup table, which will also explain Sven's bug report.
Sure.. except I haven't written a batch script in years. Perl runs on both my windoze box and FreeBSD boxes.. no need to worry about whether I need .BAT or .SH files
I'm the same in reality, I maybe have 10 setups I use (for the limited selection of cars I choose to drive). I was going to do it via a few rename calls in DOpus, but decided I'd be lazy and hack a script together to completely automate it
heh yup.. didn't seem much point in opening my C++ IDE to hack together something this simple (and I don't know any regex in C++)
Here's the script. Excuse it not being the tidiest, was a quick hack for myself really, but decided to post it.
Regards,
Ian
PS: herki.. I'm wondering whether the bug Sven has posted about is something to do with locale settings, although would seem strange considering the code. If you test this (backup first ) and notice a similar problem.. could you restore your backup and run it again and redirect the output to a file and PM it to me please? Obviously I'd like it to be bug free for everyone, not just a few
Last edited by Ian.H, .
Reason : Attachment removed, updated version in post #1
Sorry lads, no idea if it works on Vista or not as I'll be avoiding that OS for as long as possible.
You don't have to start the DOS prompt in the dir of the util.. you can specify it as: "C:\whereever\you\downloaded\the\file\to\x10_to_x30_setup_fix.exe" --path="\path\to\lfs" etc.
I modified my registry a long time ago to give me a 'Command Prompt From Here' option in explorer / 3rd party file explorers making that task simple (plenty of info on the net for anyone wanting to add that option for future usage too).
Sven.. I don't know what happened there.. I ran several tests here that didn't cause any problems.
Is there something perhaps "weird" about your directory names?
And a silly question, has it really lost that many setups, or are you comparing number of files that were in your original 'settings' dir compared to what's now in your 'setups' dir? The original 'settings' dir contained both colours and setups, which are now separated. This util process both file types and moves them to the new relative dirs. Just making sure.
If this has screwed things over for you, would you be prepared to run a couple of tests for me if I PM you an update? (test updates won't actually rename / delete anything, will just display info I can use for debugging).
Looks like you have everything sorted(?) from the follow-up posts. Sorry for the vagueness, I literally just posted the SQL statement, rather than adding the PHP code for it too.
Just for future reference if you're interested, the error you got basically means that the PHP script contains what it's interpreting as a string (ie: no function calls etc) but it's not enclosed with either single or double quotes (not that just adding quotes in this case would have got you the result you were after as you've probably worked out by now ). PHP's error handling / reporting isn't the most intuitive.. one thing I'm not keen about on the language.. even after 7 years of using it.. you just get used to working around it
If you do still have any problems.. feel free to drop me a PM and I'll try n help ya
SELECT COUNT(*) AS total FROM `TABLE_NAME` WHERE `COLUMN_NAME` = 'search_query'
Using your screenshot, something like:
SELECT COUNT(*) AS total FROM `your_table_name` WHERE `GAME_ID` = 'TC1704.......'
This will result in an array / object element (depending on your coding style) named 'total' containing the number of records found.. as you're expecting.
Not a drama queen act at all.. it's a common response from people to tell others that have become somewhat bored of the current state / content to "go play something else and come back later".. I did that, for 2 years. I came back (I obviously like something about LFS to come back and try it again) and still not much has progressed.
I'm well aware that I bought a license for a pre-release as such, not complaining about that.. what I didn't realise I'd be buying was such a long delay in moving forward (and no, I'm not complaining about the actual purchasing.. just the delay.. £24 will be well worth the money when some decent content appears).
I find the tracks uninspiring.. most of the cars the same (although maybe I'm strange as I much prefer more of a stock car than a high downforce GTR-spec), the tracks all feel somewhat too samey samey.. not entirely, but reusing a tiny section of tracks to create a massive collection of combinations gets boring to drive on and most really not that fun considering most S2 tracks have been designed to run cars on that top 180mph+ judging by the widths / lengths of straights in most.
There's been no attempt to fix the bugs on tracks etc either (or at least that we've seen).. how long is one supposed to sit staring at that carrot hanging on the string before we think "bollox.. I'll get a takeaway"?
Regardless of my comments, I do have a lot of respect for Scawen as a coder.. he's certainly achieved something I could never do.. but people have varying levels of patience. maybe mine's less than yours.. but there's been nothing new to inspire new interest in 2 years with LFS.. but like commuting to work, driving somewhere new might be interesting to some for a while... after a few years of the same route, it starts to become a chore. I guess I was just hoping for and somewhat expected (going on past progress) that we'd have had some new content by now. Maybe I should have paid a bit more and properly bought into the "LFS Dream"(tm) where I'd be happy as long as the project is complete before I'm bedridden with age.
Or you can just take a break.. like I did.. for 2 years, and come back to find umm...... well, not a lot has changed really. Looks like I'm about to take my 2nd 2 year break.. maybe I'll come back to S2 BETA by then.. but there might also be a pot of gold at the end of a rainbow too or a large pile of rocking horse shit in my front room.
I think this is one of the major problems / issues a lot of people have who are asking for more updates (especially content).. many, like myself, don't want continuous regurgitations of the same tracks, we're bored shitless of them.. we have way too many of them as it is (look at Aston!!).. it's lazy development and shows a lack of imagination (much like just making GTR versions of existing cars rather than new cars... oops! did I say that out loud?)
What LFS needs are new _environments_.. new areas, completely new tracks.. not a few polys added / moved here and there to the tracks that have been around since day dot.
Out of all the track _combinations_ we have of the 4 tracks(?) there's about 3 that are semi interesting, IMO, BL1 being the best track in the game.
Is it not then, false advertising? Is that not similar to me writing an application and slapping a big hologram in the corner of the site page / physical box saying 'vista ready!' only for someone to buy it, install it and find that it'll load, but won't save settings as I set the data dir to be a subdir of $ProgramFiles?
Granted, I'm stretching this.. but so many here seem to think that you can't get better than LFS for realism, but in truth, there's more realistic already out there and has been for quite some time (although some of the alternatives don't have such good tyre physics). I'm not saying that the more realistic doesn't also have some arcade features (I think most race games have a stupid HUD mode) but LFS really isn't the "cream of the crop" in regards to realism as so many here would love others to believe.
Most here seem to want more and more realism.. yet in the same breath, whinge and bitch about certain "convenient options" being removed (or set as forced server-side options). Amusing, no?
I doubt there's much that sounds like a carerra gt, except a carerra gt.
Now _that's_ got to be the most stupid reason I've ever heard. How come amateur racers running 1986 Mk2 Fiestas can manage to put sponsors logos / graphics the correct way on both sides of their cars?
It's a stupid trend, much like the pub benches "drifters" often stick on the rear hatch.. seriously, surely the idea of "drifting" is to get the rear wheels loose.. the idea of a rear spoiler is to increase downforce and thus traction... hmm, what was I saying about IQ levels....................