The online racing simulator
Searching in All forums
(921 results)
broken
S3 licensed
I think that there are more than a few articles on the internet about this. I am not the one who should teach you.

http://www.google.com/search?q ... o+set+up+a+mysql+database
http://www.google.com/search?q=install+mysql

I don't think it is that hard, but there - I saved you a few key presses, how awesome is that.
broken
S3 licensed
Have you set up a database?
Is remote access allowed to the database(in case it's in another host)?
Have you created a users table, like the one in the sql file attached?
Have you changed the db connection settings in the insim(as said in the 1st post)?

This is not a problem from the insim, I am certain. But it is however it's protection, against connection problems.

In case anyone cares how it works: It tries to not mess up any user accounts. But in the moment someone disconnects and the database can't be reached - they lose the stats they have built till that moment. However, in case they have connected, while the db has been down, and they've made some points - when the connection is restored, those points will be summed up with the points from their account. Of course, if the db goes down, and you make some points on top of the ones loaded(from the db obviously) the previous time - they won't be summed up with the points from your account again, because that would be stupid.
That's why there's a !save command. And for admins there are also the !saveall and !save [user] commands.
Last edited by broken, .
broken
S3 licensed
Quote from marcel1 :I Have A Problem with The Database (mysql) i can´t let them Connect.
Help? PM, or in This Thread - Thx

What is the problem?
Who can't connect?
Provide some error message(s)? Provide some code maybe?
In this thread of course - what if anyone else encounters the same problem?
broken
S3 licensed
Ah, what is this? I mean, come on guys, don't tell him what to do. Sure, suggest the best way from your experience, but don't just go "I told you to do this and this". It's just not right. You're all telling him to do different things, and you all may think that your way is the best way, but it is actually ..not.

The best way for him is to find the way that is most interesting for him, or from which he learns the fastest, or in the perfect case - both. Any of those will work just fine. All you need to understand when you start learning any programming language is that it will not happen fast. You need lots and lots of practice and getting used to the syntax, methods, functions, everything, so that you will be able to do stuff fast. Also, you need to find the best practices for you, or said in another way: find your favorite style of coding.

And when you are asking a question in the forum.. Or, even when you are giving an answer - mind your spelling A LOT. None of the posts in this thread are spelled correctly. What? r u gonna save 10 secs mor if u rght lik ths? u gnna luk cuul? No - you simply won't get any replies. And then you will wonder why is it like that. And if you eventually end up complaining about it in another thread, while having a bad day.. or if for any other reason your complaint is a bit harsh - you will basically get bashed a lot. First - because most of the people won't understand what you're saying from th way u typ, and second - because even if they do understand, they are not going to like it, and are still going to bash you for your bad english(well, not all of them of course, but if your reply is "good" enough, you won't see any of the "good" people replying and standing on your side).

All I can say in the end is: Good luck, in learning the language you want to learn. And of course - mind your spelling and punctuation when posting. I understand that my posts aren't perfect either, they can't be, but at least I'm trying to make them as readable as possible(well, at least most of them).
Last edited by broken, .
broken
S3 licensed
Sorry, but I helped you and all you seemed to say back to me was "FAIL". Don't expect anything more from me.

On top of that, if you follow the logic, it will work. But maybe you're lacking common sense, and that, I can not fix.
broken
S3 licensed
Quote from broken :What amp88 said.
line.Substring(n, 6) will never equal "Flowers"

Quote from skywatcher122 :its suppose to be

F L O W E R S
1 2 3 4 5 6 7 ?

Have you passed first grade yet? Can you make difference between the numbers?

Go ask your application if it sees Flowers in 6 letters. I think it sees Flower. Go and wonder why it doesn't want to find your Flowers then.
Last edited by broken, .
broken
S3 licensed
Quote from stuntguy3000 :

if (line.Substring(0, 6) == "Flowers")


line.Substring(n, 6) will never equal "Flowers"
Last edited by broken, .
broken
S3 licensed
Well, then reset the DistanceSincePit var when people spectate. And which insim app is this? Because DistanceSincePit is a variable name that I created long back while I was still developing OsC's insim app. And it was pretty buggy, and how could you have gotten it anyway..

Anyway, I'm not going to give you an example in code, because it seems to me that that's the way you like to work. With basic explanations.

hint hint: to be sure that the bonus is always reseted when it has to be, reset it when people leave the pits.
broken
S3 licensed
You basically said nothing more than nothing. Give us some code snippets of where you think the problem comes from. Explain better what this code is supposed to do. And then, eventually, hope on some help. The less info you give, the less the community is able to help you.
broken
S3 licensed
Quote from skywatcher122 :MCI Updates + InSim.Button

Not even I got the point.
Quote from stuntguy3000 :I don't understand that...

I will Provide the button code

InSim.Send_BTN_CreateButton("^7Deposit", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 5, 20, 50, 125, 204, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);


Type //> InSim.Send_BTN_CreateButton( <\\ and you should get value input help(if.. that.. made any sense). You can see that there are 2 additional parameters that you can fill in. This makes the button an input one(god, did this explanation suck or what).

And when I have some free time I will give you a piece of code to look at, even tho that I don't like this practice a lot, and even tho that this question has been answered a lot.

While no reply arrives from anyone giving correct help, you, stuntguy, can search the forums a bit more to find the solution to your problem(because I am sure that it has been answered in not just one thread).
broken
S3 licensed
I don't know if you can find step-by-step tutorials on programming insim apps, but you can get some of the many open-source projects, which lie in this section: http://www.lfsforum.net/forumdisplay.php?f=179

Then you can either start tweaking with them, or start from scratch, by going online and learning the basics of the language you would like to be programming your application in. Or... you could do both.
broken
S3 licensed
This is in a wrong section.
If you like, you could bump one of those threads, to bring it up again. I don't recommend bumping both of them, because that would be a bit stupid.
Also, I do not recommend making a new thread in the improvement suggestions forum, because.. well, you will be flamed a lot more about it than just +1ing an old thread.

Links:
http://www.lfsforum.net/showthread.php?t=69227
or
http://www.lfsforum.net/showthread.php?t=33424
broken
S3 licensed
Quote from Victor :I'll be sure to have a look at SlimDX. I agree with you basically, but I've been holding off on learning c++ properly for a long time now because I often quickly thought 'hmm but if i use that higher level language, i can save time', but then in the end I run into annoying bits. It's how I feel about Java for example. It's lovely that you can create applications that are cross platform compatible and everything's done quite easily. But the performance is horrible and interface design is ancient.
But ok .. I should really look at what the C# buzz is about. I'll believe it won't have such a performance impact; not like Java anyway, so hmm well, it might be nice. On the other hand it would mean that, once again, I'm holding off on learning c++. And I really want to be able to code some actually usable stuff with it and not just some 'fun experiment'

I sometimes feel like C++ is my ultimate mountain to climb. I want to do it, one day, but i keep taking routes around it, never really getting where I want to be. I'm avoiding the route that goes straight to the top, because it looks so steep
But really, is it so steep? Maybe for a complete beginner, but I've passed that stage a while ago now I'd like to think...

Please, learn C++ properly. It's always been my goal too and I've always been avoiding it, just because of the same reasons you mentioned. And if you do it, you will just push me one step closer to it too. It's what you want anyway. And in the end of the day if you do it the other way, you will probably think "ehh, I did it the lazy way again" and you won't be as happy as you would be otherwise.

Basically, you would be better example for me than anyone else in this forum, I think. I've wanted to learn it since I have started to get into this whole world of programming. And I never did it right.. -.-

ps: You can also see how I'm trying to stay away from C#. Posting 2 out of the 3 best projects I've ever worked on(all C#, obviously(obviously)). But it didn't have the impact I was hoping on.
Last edited by broken, .
broken
S3 licensed
The logic is pretty simple..

Scenario if you are the flipped car ::>
1st. You type !towrequest or whatever you want the command to be
2nd. You wait for (all or the nearby) tow cars to be informed
3rd. You receive a message of the status of the informing process

Scenario if you are the tow car that's going to be informed about it ::>
1st. Nothing happens before the !towrequest command is executed
2nd. You receive a button with information about the flipped car
3rd. You are allowed to either accept or reject the tow request?
4th. When you go near the car you do whatever the rules require you to do

Scenario on the programming side ::>
1st. You listen for MSO packets
2nd. You recognize the !towrequest command when received
3rd. You iterate thorough all of the users
4th. If the current user is tow - check their distance from the flipped car in nodes
5th. If they are close enough - display a button, and allow them to accept or reject the req
5.1. Inform the flipped car that tow cars have been found
6.1. If the tow car accepts - inform the user again
6.2. If all the tow cars found reject the req - again, inform the user

There it is. Step by step. And I guess that you will be using an open source project as a base for your insim app, so you can ignore step 1 on the programming "scenario".
broken
S3 licensed
Quote from sun :Finally.... It connects to the server. Ok, since thats out of the way, now it wont connect to my SQL. I dont understand the way this code has been set out but is this right, if:

server is localhost

DB: wwclfscruise

UID: root

Pwd: test15

void OpenDatabase(string server, string database, string username, string password)
{
SQL.ConnectionString = "Server=localhost" + server +
"Database=wwclfscruise" + database +
"Uid=root" + username +
"Pwd=test" + password +
"Connect Timeout=30;";
SQL.Open();
}

Are you serious? I really am NOT going to help you. I think this is the first time I have ever said this. Look your code up VERY VERY carefully. The mistake is too obvious not to see. I mean.. Are you REALLY serious? Cause if you are, then I am really amazed..

Also - debug. And not only debug - but debug efficiently. Or throw errors in built versions, or whatever you want. Just find a way to output error messages. And not error messages that you get while compiling (string can't be int and the likes), but runtime error messages. Try using try maybe?
Last edited by broken, .
broken
S3 licensed
Quote from sun :I've already tried that

Obviously, not well enough. Try more, maybe?

Damn it..
broken
S3 licensed
I still don't see any numbers in my PM box. I guess I'm not that important.
broken
S3 licensed
Obviously not, I don't see any replies between the two you've made.
broken
S3 licensed
Quote from marcel1 :correct! But its LsC so...

It was supposed to be a harmless joke, not server stereotyping(if there could be such a thing ).

I mean, sure, his taste in cars sucks. Obviously . But by saying that I don't mean to insult him. So, your reply, sir, is irrelevant.
broken
S3 licensed
Quote from skywatcher122 :E36 is just for nothing

Shut up. You don't understand!
broken
S3 licensed
Tempt me with a number in a pm.
broken
S3 licensed
Quote from E.Reiljans :Maybe because LFS is racing simulator?

That's like saying that retarded people don't deserve to live, because they are not using the world as "normally" as you are. But what does normal really mean? Maybe we are actually the retards, for taking this world so seriously?

That was my smart and polite way of insulting you, in case you didn't get it. ^_^

&@DarkTimes: I agree. Kind of. And I would do this if I had the needed knowledge.
I don't know how to handle packets at all. Well I have a basic idea about doing it in C++, and I would really love to make such a platform and with that in C++, but there comes the other problem - I don't know C++.
I know C#'s syntax, and I have a basic idea of handling packets in C++. And honestly, I prefer C++, cause of it's portability and because of how low level stuff you can do. And I quite like working behind the curtains. I don't like being left in the dark.
So, there you go. After a year or 2, when I know C++ well enough I might actually get my hands on such a project. But till then, people have to either hope on somebody else to start it, or just wait and see if I will even be around in a year or 2(I think that I will. But I do not promise :razz.
Last edited by broken, .
broken
S3 licensed
Totally, 100% -> +1.

I made an arrow, you see? Cause a dash looked like minus plus. I'm so smart, aren't I. Ok.. really going to bed.
broken
S3 licensed
@last 2 posts

Stop with the cruisism childishness. Please? The person wants to find a programmer, I find nothing wrong with that. He wants to make his own cruise server. I find nothing wrong with that too. It's his own preference, and you have no word on what type of server anyone else, OTHER THAN YOU is going to host.
broken
S3 licensed
Not many really. But the idea behind this insim is what was unique.

Whenever you win a race, you get the chance to pick the car for the next race. You also win points, according to how many people you have raced off. For now, all you can do with those points is check your position in the rankings. There were supposed to be not only bronze points, but also silver, gold, platinum and global ones. But I never got to finish this tbh. I had a pretty cool plan on how to combine them all, but well... Graduating high school makes your life kinda busier..

Anyway, there are also a few little details for the racing too: If you join the race after the 1st person has made the 1st lap, you will not receive any points at the end. Making the 1st lap makes the insim "lock" the stats. Whenever you pit/join during the 1st lap the stats will update and include you in the scoring.

You may be wondering what the idea behind this is: Well, it's pretty simple. At the end the winner of the race wins points equal to the total racers. Each position below that wins 1 point less. This means that the last person would win 1p. Something like a prize to not feel like you've raced for nothing. ANYWAY, you wouldn't want to detect how many players there are on the track in the moment the 1st guy finishes, because if the race started with 2 people that would mean that he would win ..25 points for example, if there are 25 people on track. Instead, the number of racers stays dynamic until the 1st lap is made. Then it locks this number, along with a few other variables to make sure that nobody gets points at the end if they have joined AFTER that point. Pitting also counts - if you pit after the 1st lap you will not win any points from that race. But the winner still gets a point from you being in the race for the 1st lap.
Pretty simple I said, and wrote a wall of text.

There are some cool features too. Like the collision detection: If you have stopped somewhere on the track and somebody is coming fast towards you, you will get spectated at some point. When less than 1.5 seconds are left to impact iirc. The racing car receives warning window(s) about stopped car(s), so the racer can act appropriately, as you can't always rely on the insim, since when the speeds are too high the insim itself has less time to react, and sending a /spec message to the server slows the whole operation too. This may make racing less realistic, but stopping in the middle of the track itself isn't realistic(in most cases in LFS), cause clean racers spectate when they crash, and "bad" drivers just stop to make sure the race gets screwed. The windows show you times to impact, distances, player names and idk what else about the coming stopped cars. The insim takes action really at the last moment(especially when racing on Oval, since that's where OsR was on most of the time), so once again - beware, that's why there's a window too.

Also there was one unfinished thing about this. I really don't want to say it cause it may get exploted, but for the sake of the programmers: At the start, if someone jump starts - it spectates the driver in front, because the insim detects it as a dangerous situation. Yeah, kinda dull, but I never got around fixing this. Sorry.
One more thing: If the guy that has stopped is one or more laps ahead of you, they will not get spectated. It is something that I found necessary, I don't remember why. But I still see some logic in it.

And, that's about it I think. There may be more stuff, I don't really remember. But I told you the things I'm proud of and the things in them that I'm not proud of.

And WHEN the hell did I write all this.. I guess I'm still excited about my most successful C# project, haha..
FGED GREDG RDFGDR GSFDG