Just a Q: When an official/stable version of LFS arrives, what do you plan on doing? I think it would be better to keep it compatible only as far as stable versions are concerned. But, anyway, we have the source, so we can tweak-a-la-freak as much as we want. Which means, that in the end, it doesn't really matter.
@Nasty! : I think you would need to provide the exact string of the problematic nickname, or maybe a replay would work too. Though, I think, the string is preferred.
ZanZi, "неможе" не са ли 2 думи? До колкото знам е така, но не искам да променям превода преди да потвъриш. Така де, проверих и в google translate, дали ще ми предложи "не може" като напиша "неможе" и така и стана!
Понеже го има на много места, за сега няма да пипам.
And since this is not a Bulgarian forum, let me translate what I just said:
Zanzi, isn't "cant" actually 2 words? As far as I am aware it is, but I don't want to change the translation before your confirmation. I mean, I checked google translate too, if it would suggest "can not" to me if I write "cant", and it did!
Since the word is on many places, I'm not going to touch the translation for now.
Please, when you paste code on the forums, indent it appropriately, to a level that is sufficient enough to scan through it well.
Second, please put the code in [CODE] tags, or even better - [PHP] ones, if the language is compatible enough, which, imo, C# is.
Third - Please try to resolve the issue yourself first. Look at the code around, especially when it's that much. Look for similarities between your and the other code. Then, when such found, look for differences in the problematic place. This one, is very obvious. But I'm not going to fix it for you just like that. Put some effort in it! You'll find more details in the code and after it.
Situation 1: Ok, where do you see a variable named NPL being used in the MCI handler? NPL is usually the name of the packet you receive when a player joins the race. You've changed only the text part, expecting the code to be universal. Well, sorry, but it's not. I want you to resolve this yourself, because around 2 or 3 lines above, a message already is being sent, and let me bet - it sends it successfully.
Situation 2: Absolutely the same thing. Right 2 lines above, I see a message, that will be sent successfully.
So, here's the deal. You fix those, and come back showing me how you've done it. If it's correct, I'll help you make your code in that part a lot more readable, and I'll explain what steps I've taken and why.
Thanks for the clarification. I just decided to go back on that timer, because it's all working perfectly now, but indeed, I am thinking that it's leaking memory.. Well, not exactly memory, but whole event-handling references (if that's what they are) lol! I mean, nothing is suggesting that, because after all, it doesn't really have time to build that much loops, but with those new things I know (exciting, I am starting to feel like I'm finally about to stop drowning, and have a chance to swim on top of multithreading) I am definitely going to check and optimize it if needed. It was like the opening of Pandora's box whenever I took a step into multithreading till now. And I was mindeffed yesterday, because I dug a bit into it, and yeah... My head failed in multitasking, as I was failing to understand multithreading, if you allow me to put it that way. But now the basic concept makes perfect sense in my mind, yay!
And I just had the perfect idea what to do. I will be building a string, as long as the timer is running. Before I lock the whole thing, I will add "Attempt to access resource (", and if the lock is entered - I will simply add "success". After the lock, simply another ")" and a new line added. That would make a perfect report. Ha! Thanks!
But first, I'm now going to press that F1 key on the timer object.
Ah, could be my nickname too, yes.. Didn't think about that.
My nickname is this: ¡¸THC¡áBroken¡¸, OR
I even made a quick log to give me the nickname and the base64 value of it. There it is, all from the app, originally:
^7☆THC﹥^3Broken^7☆
Base64 encoded: XjfimIZUSEPvuaVeM0Jyb2tlbl434piG
Edit: If I need to hook up an event to InSim.InSimError, wouldn't that mean going into multithreading? I'll try... But after I get some sleep, because it's totally not my day today!
Awhh! Sorry, forgot to save the replay.. :doh:
I've been distracted the whole day today, couldn't do a thing normally..
Globals.MS is simply the server message start character, to make the messages from the InSim app differ from normal text..:
<?php public static readonly string MS = "^3» "; ?>
But IS_CON fails rarely. Also, it used to disconnect from the host, before I decided to catch the exceptions thrown from it. And just that - it disconnected, without crashing my app.
Sorry for being zero help, really, I don't know how I forgot to do that! Just.. stupid.. ;d
Anyway, I'll make sure to get a replay if/when it happens again.
I am just having my insim running on my client, on a server that's not mine. And when I crashed into the person with the following nickname: "GaZ" (quotes included in nickname) , I get the following error:
Message: Index was outside the bounds of the array.
StackTrace: at InSimDotNet.EncodingHelper.GetBytes(String value, Byte[] buffer, Int32 index, Int32 length) in C:\Users\Loran\Desktop\Random\InSimDotNet\insimdotnet_6b678d6ab605\InSimDotNet\EncodingHelper.cs:line 92 at InSimDotNet.PacketWriter.Write(String value, Int32 length) in C:\Users\Loran\Desktop\Random\InSimDotNet\insimdotnet_6b678d6ab605\InSimDotNet\PacketWriter.cs:line 121 at InSimDotNet.Packets.IS_MST.GetBuffer() in C:\Users\Loran\Desktop\Random\InSimDotNet\insimdotnet_6b678d6ab605\InSimDotNet\Packets\IS_MST.cs:line 50 at InSimDotNet.InSim.Send(ISendable packet) in C:\Users\Loran\Desktop\Random\InSimDotNet\insimdotnet_6b678d6ab605\InSimDotNet\InSim.cs:line 231 at InSimDotNet.InSim.Send(String message, Object[] args) in C:\Users\Loran\Desktop\Random\InSimDotNet\insimdotnet_6b678d6ab605\InSimDotNet\InSim.cs:line 265 at Dizplay_Cruise.Dizplay.iSendMsg(String Message) in D:\Loran\Programming\C#\Live for Speed\Dizplay\Cruise A.0.1\Dizplay Cruise\Dizplay Cruise\Dizplay.cs:line 240 at Dizplay_Cruise.Dizplay.Received_CON(InSim InSim, IS_CON CON) in D:\Loran\Programming\C#\Live for Speed\Dizplay\Cruise A.0.1\Dizplay Cruise\Dizplay Cruise\Dizplay.cs:line 553
<?php public static void iSendMsg(string Message) { InSim.Send(Globals.MS + Message); // This is line 240 } ?>
Is that you or me?
Edit: It happened before and after I updated to that last update in the repository. But I couldn't copy the error from the previous version. Also, if needed, I could save the replay and send it to you. In fact I will save it now, you say if you want me to upload it here.
If I ever visit Glasgow, I'll make sure to drop by with some beer, or whatever it is that you drink. I definitely learned a hell of a lot, in just a few minutes of reading this and the article you've sent me. And you can be sure that I'll be reading the rest of it, very soon.
Just to clarify one thing tho, because it's still very blurry in my head: When I create those threads, they stay running, right? Is the code in my last post going to kill the thread, or is it going to just keep on running? I mean... Even if 1 player is on the server, I would like to keep the thread running, but I could achieve that with a more global var. But when the server is empty, I have nobody to send buttons to - so why keep it? I'm getting a bit off the question here - I just wanted to ask - how to kill the timer's thread?
Wanted to bump (now I'm getting really annoying, haha).
So, how do I check if I have already created a thread, without having a global variable, which I set to true immediately after I start the first one? Or is that the most optimized way? Multithreading is just not my thing, yet(positivity FTW!).
Edit: God, I didn't even google it before asking the question. Will do now.
Edit2: Ok, is this efficient enough, and does it actually work as you would suggest I expect it to work?
At the bottom of the elapsed event (look snippet above if needed):
<?php if (QueueHolder.Count < 1) { QueueProcessor.Stop(); QueueProcessor.Enabled = false; ---> QueueProcessor.Elapsed -= new ElapsedEventHandler(Processor.QueueProcessor_Elapsed); } ?>
Oh man.. Multithreading - not my territory. I think that when I'm starting the timer, I'm actually creating another thread, and then when I'm stopping it I'm not clearing it? So, that would mean that when I create another thread and start the timer, it starts the other threads as well?
Just restarted my lappy, so I'll take 5mins and edit the post, to tell you if this is what's really happening (to run C#). If that's the case tho, I won't be able to reply very fast, because one of my palms will need to stay on my face for a while.
Edit: Oh god! -.-
<?php public static void Start() { if (QueueProcessor.Enabled != true) { QueueProcessor.Elapsed += new ElapsedEventHandler(Processor.QueueProcessor_Elapsed); QueueProcessor.Interval = 10; QueueProcessor.Start(); QueueProcessor.Enabled = true; } } ?>
And I'm calling that each time a button is added to the queue.
I will attach a screenie, because that's the best way to explain what happens.
As you can see, I remove the item AFTER I get the info I need out of it.
Can someone confirm that this is impossible and I must thoroughly investigate if I'm not clearing something from the list somewhere else? Because, I have. But I will go into S&D mode if you tell me that's 100% the problem. I'll just turn the app upside-down, tare it apart if I must, till I find the little effer.
Seriously, it's been bugging me from like a week now, and I'm going :gnasher:
It happens in some cases, which really makes me think that I'm clearing a record somewhere else too. The problem is probably very small, and I'm just being very very lame..
So, sorry if this is a really lame question, I just haven't been able to get my thoughts around it from like a week.. if not two.
May I suggest something? Let's all who think that the devs should take the holidays off, say it. Because, after all - holidays are holidays, and most of the people don't work at that time. But being on your own can make you feel guilty about not working, or.. something. So, Scavier, in an all not-telling-you-what-to-do way, we won't die if this release is a little late. Scawen said 1-2 weeks, yes, but for those who don't know, 1-2 weeks, in the real business world, mean 1-2 weeks of work days. Which means that, technically the release won't be late anyway. And everyone deserves to have fun at the holidays. So, I'm totally +100 if you, devs, decide to take these 4 days off and have fun with family, friends, etc, because that's what really matters after all, isn't it?
And to all who think that they should work - shut up!
But seriously - if anyone complains, because they haven't been able to have fun during the holidays, due to the patch not being released yet - check yourself again, because holidays aren't made for gaming.
1. InSim.NET is actively being developed, while LFS_External is currently on hold;
2. InSim.NET is open-source, while LFS_External, is not /which means that even if development stops on it*, you can still update it yourself, if you want to/.
From what I know/remember, features as choosing width, length, etc of objects will be available in some of the patches in the future? So, I guess the wider ramp is like a temporary solution. And so will be the longer barrier.
Yup. (It's not "mine" tho. Me and Ales built it.)
And with concrete barriers(which you won't really need on the bridge layout), you can be 100% sure that you just won't fall out.
Also, since I replied anyway, I would like to raise the Barrier2 (= 20m long Barrier) question again. Would that be easy to make? And do you guys think it would be useful /- I meant that as a question to everyone/?
Sorry if anyone suggested this already, but since ramps can get bigger, can barriers become longer too? Like, have 20m long barriers, instead of the standard(7m?) ones. This would be really helpful, especially when making new combos.
..If it's a quick change of course.
[Correction] Can we have Barrier2, which will be longer - not making current barriers longer. But, I hope that was pretty much obvious.
I just want to give you a little hint: It's not "just a little thing". If you want to count wins/points/driven distance, and have those things saved offline(I mean, in a database), you need ... well ... a database. And to make it unique, I don't know how you can use Airio or Lapper to do it, but if you want it from scratch - well, it's not that small of a project.
When you say what it does, really, it sounds easy. But to make it work flawlessly, that's a whole other world.
No offence or anything, I just wanted to try and explain why it's not really the small project you think it is (which, you obviously are not a programmer, and are in no way obligated to know - it's understandable). But yet, maybe it's easy to accomplish with Airio or Lapper. Anyway, since I don't know about that, we will have to wait and see if someone familiar with those applications will say something on the question.
Why would the developers want to blow this out more, by giving us these videos? If some of them starts a thread about the videos, in the end, it's just going to turn into another "Progress Report December 2010" thread. Yes, I did mean this thread. It's ridiculous. I'm sure they know we want to know about these videos. I'm sure they want to show them to us really bad. But think a bit vice-versa here, you know perfectly well why they aren't doing it too. So, why do you find the need to bite? You know that Scawen is eventually going to be annoyed by the constant moaning in the videos thread, and he will reply again, which will bring a few good comments, till the moaners come and spam everyone out again. HE KNOWS THAT TOO. That's why, if I were him, I would do exactly the same thing.
What more do you not understand?
I haven't quoted anyone, so:
In case you haven't got it, this goes mainly to you - RasmusL.
As well as everyone who feels offended by reading it. And maybe a bit to you two: Udris1992, Xenix74.
Well, that's actually inevitable, unless it is somebody you already know from a long time. And if that's the case - then, again, you don't need a CV. Handing over your source to someone you can't really trust, is, in itself, a pretty bad idea (unless you make them sign a contract or something, but now that, is not my territory any more).
But don't get me wrong, I am not telling you what to do here. I am just giving suggestions. After all, it's perfectly your choice.
In the end, I'll just tell you my final opinion: Just postpone the update(s), it's going to make your life easier.