The online racing simulator
Searching in All forums
(921 results)
broken
S3 licensed
What have I found so far?

2.0.10:
You can't read from AXM.Info[i], it gives you an error. I am trying to get the Index of all received objects in a function, and that didn't seem to work.
In change set 142d0e60cb66, however, it works well.

And yay, my first StackOverflow (more precisely - first time I encounter one, because I don't think it's my source :razz. This happens when I try to add an object. Here's a screenshot (I should've just used the Snipping Tool, but who to think):


Also, the function I've created to send an object follows:

<?php 
        
public static void Send1Object(short Xshort Yshort Zbyte Headingbyte Index)
        {
            try
            {
                
// Create the AXM packet
                
IS_AXM AXM = new IS_AXM PMOAction ActionFlags.PMO_ADD_OBJECTS };

                
// Create the object
                
AXM.Info.Add(new ObjectInfo() { XYZchar ZHeading HeadingIndex IndexFlags });

                
// Send the packet to LFS
                
Dizplay.iSend(AXM);
            }
            catch (
Exception E)
            {
                
ErrorRecord(E);
            }
        }
?>

It doesn't even care that I have surrounded the thing in try/catch blocks. It goes by it like a bus, passing an empty station...
Last edited by broken, .
broken
S3 licensed
Sorry for a possibly very lame question, but: Can you give me a very short example on how to send an AXM packet to add an object, please? Just simple static values of 10 for both X and Y coords would do, nothing more.

I tried, but I can't modify Info, so I guess I'm doing it the wrong way.

Thanks.
broken
S3 licensed
I am quite new to Mercurial and CodePlex yet, so if you allow me, I will just post my suggestion here. Modify whatever you want in it. I know sometimes even tiny little details can be annoying (they are to me), so, just, don't hesitate to change it however you want.

I need to stop talking! CODE, FINALLY:

<?php 
using System
;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;

namespace 
InSimDotNet
{
    
/// <summary>
    /// Static class to help with object names.
    /// </summary>
    
public static class ObjectHelper
    
{
        
#region ObjMap
        
private static readonly Dictionary<bytestring[]> ObjMap = new Dictionary<bytestring[]>()
        {
            {
0, new string[] {"Unknown""Unknown Object"}},

            {
4, new string[] {"Chalk""Chalk Line Long"}},
            {
5, new string[] {"Chalk""Chalk Line"}},
            {
6, new string[] {"Chalk""Chalk Ahead"}},
            {
7, new string[] {"Chalk""Chalk Ahead Long"}},
            {
8, new string[] {"Chalk""Chalk Soft Left"}},
            {
9, new string[] {"Chalk""Chalk Hard Left"}},
            {
10, new string[] {"Chalk""Chalk Soft Left Long"}},
            {
11, new string[] {"Chalk""Chalk Soft Right"}},
            {
12, new string[] {"Chalk""Chalk Hard Right"}},
            {
13, new string[] {"Chalk""Chalk Soft Right Long"}},

            {
20, new string[] {"Cone""Cone Red/White"}},
            {
21, new string[] {"Cone""Cone Red"}},
            {
22, new string[] {"Cone""Cone Red Striped"}},
            {
23, new string[] {"Cone""Cone Blue Striped"}},
            {
24, new string[] {"Cone""Cone Blue"}},
            {
25, new string[] {"Cone""Cone Green Striped"}},
            {
26, new string[] {"Cone""Cone Green"}},
            {
27, new string[] {"Cone""Cone Orange"}},
            {
28, new string[] {"Cone""Cone White"}},
            {
29, new string[] {"Cone""Cone Yellow Striped"}},
            {
30, new string[] {"Cone""Cone Yellow"}},
            {
40, new string[] {"Cone""Cone Red Directional"}},
            {
41, new string[] {"Cone""Cone Blue Directional"}},
            {
42, new string[] {"Cone""Cone Green Directional"}},
            {
43, new string[] {"Cone""Cone Yellow Directional"}},

            {
48, new string[] {"Tyre""Tyre"}},
            {
49, new string[] {"Tyres""Tyre Stack of 2"}},
            {
50, new string[] {"Tyres""Tyre Stack of 3"}},
            {
51, new string[] {"Tyres""Tyre Stack of 4"}},
            {
52, new string[] {"Tyre""Big Tyre"}},
            {
53, new string[] {"Tyres""Big Tyre Stack of 2"}},
            {
54, new string[] {"Tyres""Big Tyre Stack of 3"}},
            {
55, new string[] {"Tyres""Big Tyre Stack of 4"}},

            {
64, new string[] {"Marker""Marker Curve Left"}},
            {
65, new string[] {"Marker""Marker Curve Right"}},
            {
66, new string[] {"Marker""Marker Left"}},
            {
67, new string[] {"Marker""Marker Right"}},
            {
68, new string[] {"Marker""Marker Left Hard"}},
            {
69, new string[] {"Marker""Marker Right Hard"}},
            {
70, new string[] {"Marker""Marker Left->Right"}},
            {
71, new string[] {"Marker""Marker Right->Left"}},
            {
72, new string[] {"Marker""Marker U-Turn->Right"}},
            {
73, new string[] {"Marker""Marker U-Turn->Left"}},
            {
74, new string[] {"Marker""Marker Winding Left"}},
            {
75, new string[] {"Marker""Marker Winding Right"}},
            {
76, new string[] {"Marker""Marker U-Turn Left"}},
            {
77, new string[] {"Marker""Marker U-Turn Right"}},

            {
84, new string[] {"Marker""Marker 25"}},
            {
85, new string[] {"Marker""Marker 50"}},
            {
86, new string[] {"Marker""Marker 75"}},
            {
87, new string[] {"Marker""Marker 100"}},
            {
88, new string[] {"Marker""Marker 125"}},
            {
89, new string[] {"Marker""Marker 150"}},
            {
90, new string[] {"Marker""Marker 200"}},
            {
91, new string[] {"Marker""Marker 250"}},

            {
96, new string[] {"Railing""Railing Short"}},
            {
97, new string[] {"Railing""Railing Medium"}},
            {
98, new string[] {"Railing""Railing Long"}},

            {
104, new string[] {"Barrier""Barrier Long"}},
            {
105, new string[] {"Barrier""Barrier Red"}},
            {
106, new string[] {"Barrier""Barrier White"}},

            {
112, new string[] {"Banner""Banner 1"}},
            {
113, new string[] {"Banner""Banner 2"}},

            {
120, new string[] {"Ramp""Ramp"}},
            {
121, new string[] {"Ramp""Ramp Wide"}},

            {
128, new string[] {"Speed Bump""Speed Bump Long"}},
            {
129, new string[] {"Speed Bump""Speed Bump"}},

            {
136, new string[] {"Post""Post Green"}},
            {
137, new string[] {"Post""Post Orange"}},
            {
138, new string[] {"Post""Post Red"}},
            {
139, new string[] {"Post""Post White"}},

            {
144, new string[] {"Bale""Bale"}},

            {
148, new string[] {"Railing""Railing"}},

            {
160, new string[] {"Sign""Sign Keep Left"}},
            {
161, new string[] {"Sign""Sign Keep Right"}},

            {
168, new string[] {"Sign""Sign 80 km/h"}},
            {
169, new string[] {"Sign""Sign 50 km/h"}},

            {
255, new string[] {"Marshall""Marshall Object"}}
        };
        
#endregion

        /// <summary>
        /// Determines the full name of an object or null if the Index does not exist.
        /// </summary>
        /// <param name="Index">The object's index.</param>
        /// <returns>The full name.</returns>
        
public static string GetObjName(byte Index)
        {
            
string[] obj;
            if (
ObjMap.TryGetValue(Indexout obj))
            {
                return 
obj[1];
            }

            return 
null;
        }

        
/// <summary>
        /// Determines the type of the object or returns null if the Index does not exist.
        /// </summary>
        /// <param name="Index">The object's index.</param>
        /// <returns>The type of the object.</returns>
        
public static string GetObjType(byte Index)
        {
            
string[] obj;
            if (
ObjMap.TryGetValue(Indexout obj))
            {
                return 
obj[0];
            }

            return 
null;
        }
        
        
/// <summary>
        /// Determines if the specified object exists.
        /// </summary>
        /// <param name="Index">The index of the object.</param>
        /// <returns>True if the object exists.</returns>
        
public static bool ObjExists(byte Index)
        {
            return 
ObjMap.ContainsKey(Index);
        }
    }
}
?>

I decided to use the array approach, because, imo, it gives more freedom. You know, if you need to represent the object in another way, you can just go ahead and do it. But I don't know what that means on the optimization side. Anyway, hope it works at least, because I am just about to test it, at the moment of posting this.

And last but not least: Must definitely thank T3charmy for a list of those, which I straightly copied over to C# and just modified a bit, so it's.. well.. C#, and not PHP anymore.


[E] I was stupid enough to not even try to compile the code. And it gave me errors. Did compile it now however, and it was a success.
Last edited by broken, . Reason : Armco5 (The long railing) said Barrier Long. Also, all Armco railings had &quot;Barrier&quot; as type
broken
S3 licensed
Quote from Dygear :Stop spamming the forum.

+1

Quote from impresora :Im not spamming.

Um, yes you are.
broken
S3 licensed
Quote from rockclan :When you posted the post was already edited.

Ok
broken
S3 licensed
Quote from rockclan :I don't mean to be rude, but the video is VERY bad, and there is lots of wrong English in your post, however, I'm willing to help you, so I'll correct it for you.

I don't mean to be rude either, but your post made no sense, and you're trying to look grandiloquent. Wrong English? Which of that did you fix, and how is a link, starting from the second letter of the word, continuing all the way to the end of the sentence any better than what he did? His post was perfectly fine, except a few tiny mistakes.

The only thing I would dare to suggest being fixed is the first line. IMO, it should look like this: "Hello, my name is Kent and I'm the leader of Block Team.". But, since it's perfectly understandable even without that, I don't think it's that fatal. In fact, I don't think it's fatal at all. So, you can go without any changes too.


And finally on topic: Good luck with the team!
broken
S3 licensed
Thanks for the suggestions!

I think I got it? But, I am still considering myself new at this part of C#, so I'm leaving it like that, for now, until all these things cool down and take their right places in my brain. I usually just get those (as morpha calls them) "click" moments, where I just instantly have to go and do what my brain has told me, and in most cases, it usually works. It mostly happens while I'm doing something totally unrelated.

Also, Victor, thanks for the 0-to-i suggestion. I switched to that, but, really, it's the part of my code that had no problems, and I feel like the i-- part is just an empty turnover. IMO, the less code the better, and I had experimented a lot, so I saw, that when you remove the 0 index, the whole list just drops all indexes down, so I have another 0 index. And being that way, I just have it perfect, because it picks the oldest button added. Yet, I am saying all this, because I might be wrong, or this might be totally bad practice, so feel more than free to correct me if I'm wrong.

Okay, useless facts aside, I'm just going to throw the code in, so you can take advantage of it, and/or tell me if that's not the way it should be done.


<?php 
        
public static List<clsQueueQueueHolder = new List<clsQueue>();
        public static 
Timer QueueProcessor = new Timer();
        public static 
int maxPerUCID 4;
        public static 
object QP_Lock = new object();
        public static 
string MT_Report "";

        public static 
void Start()
        {
            if (
QueueProcessor.Enabled != true)
            {
                
QueueProcessor = new Timer();
                
QueueProcessor.Elapsed += new ElapsedEventHandler(Processor.QueueProcessor_Elapsed);
                
QueueProcessor.Interval 10;
                
QueueProcessor.Start();
                
QueueProcessor.Enabled true;
            }
        }

        public static 
void QueueProcessor_Elapsed(object sourceElapsedEventArgs e)
        {
            try
            {
                
MT_Report += "Attempt to access resource (";
                
lock (QP_Lock)
                {
                    
int[] UCIDTimes = new int[256];
                    
int Count QueueHolder.Count;
                    
int MT_Report_i 0;

                    for (
int i 0QueueHolder.Counti++)
                    {
                        if (
QueueHolder.Count && QueueHolder[i] != null && QueueHolder[i].Button != null)
                        {
                            
int UCID QueueHolder[i].Button.UCID;
                            
int idx Dizplay.getUserIdxByUCID(UCID);

                            if (
UCIDTimes[UCID] < maxPerUCID)
                            {
                                
clsUser U Dizplay.Users[idx];

                                
Dizplay.iSend(QueueHolder[i].Button);
                                
U.Buttons[QueueHolder[i].Button.ClickID] = CopyButton(QueueHolder[i].Button);
                                
UCIDTimes[UCID] += 1;

                                
QueueHolder.RemoveAt(i);
                                
i--;

                                
MT_Report_i++;
                            }
                        }
                    }
                    
MT_Report += MT_Report_i " out of " Count;

                    if (
QueueHolder.Count 1)
                    {
                        
MT_Report += "; timer stopping)";
                        
QueueProcessor.Stop();
                        
QueueProcessor.Enabled false;
                        
QueueProcessor.Elapsed -= new ElapsedEventHandler(Processor.QueueProcessor_Elapsed);
                        
QueueProcessor.Dispose();

                        
Dizplay_Cruise.Processor.HistoryAdd("Multi-threading report (Button dispatcher)"MT_Report);
                        
MT_Report "";
                        return;
                    }
                }
                
MT_Report += ")" Globals.nl;
            }
            catch (
Exception E)
            {
                
Dizplay_Cruise.Processor.ErrorRecord(E);
            }
        }
?>

Sorry for being so commentless on this part of the code, where I should have the most explanations. It's just messing with my brain enough already, that explaining it would be kind of hard. But I will do it, eventually.
broken
S3 licensed
Quote from Dygear :That hurts man.

Awh, so sorry.
I shall make it up to you. Some day, I will surely give PRISM a go. ^^
broken
S3 licensed
Quote from HateSkylines :Ok, Im having some sort of issue, Ive unpacked the Z28 to Z34 files properly but everytime I try to connect to the Master Server, specifically when Im trying to go online or unlock my S2 account, it will not connect and foces me back to the main screen after sending me a an "Error cannot conect to master server" message.

I was just playing LFS online on Z28 2 minutes before I unpacked the files, any idea what I did wrong?

I would suggest trying again after a few minutes, and seeing if your firewall isn't blocking LFS, or any of its vital ports(anyone has to correct me, in case LFS doesn't have any "vital ports"). Could also be your router. Maybe you need to forward the needed("vital") ports on it, or see if the firewall on it too, is not blocking anything. Or even both.

E: Also, forgot to add that the master server is up. As I was able to connect to a server just at the time of writing this post.
broken
S3 licensed
Quote from Ziroh :I didn't said it exactly direct in the first post, i'm sorry..
But after i said it the first time you still didn't understood anything.

Okay, yup. It's because this, this, this, this, and many others + even this new project are up.

Only thing I couldn't find a download link for, was the LsC app. I haven't searched for PRISM's tbh, but I'm sure there is one. Also, I didn't include airio, because I have simply never used it, and I couldn't find it from a first look. Now, that you've made me open all these tabs, just to prove to you that you are wrong, will you please stop claiming that we didn't understand? Because if you do, well, said in your style - you must be stupid.
broken
S3 licensed
Quote from Ziroh :Seriously, you guys have to be stupid.. I'm sorry!

Don't know about that. I don't think that I can judge about this for myself. Guess I might be stupid for real, but it seems like the majority of people are asking what it is exactly, that you are asking for. And you never specify, you just call everyone stupid, whenever someone dares to suggest that you have not actually requested anything specific. Which is, actually, indeed, surely, a fact - you have not requested anything in specific. You just want an open-source. What is an open source in your head? Nobody can possibly guess. So, expect an answer from me when the human race is advanced enough to allow us to read each-others' minds, or maybe (but just maybe), when you decide what it is exactly, the thing that you really want.

Sorry for replying again, I guess I'll stop, cause it's all starting to spin in a circle.
broken
S3 licensed
The download links of cruise and race insim apps are NOT down. Drift - I guess they should be up too, if there are any. I don't understand what do you really want, and I don't know what link you have seen down. BUT - I am pretty sure that dougie's cruise app is up, and so are the OsR and the other cruise one in my sig, airio and lapper are also up. You really have no reason to complain, or want anything like the thing you want. Which brings this up:
Quote from Ziroh :So i'm posting in the Request forum, but don't want anything?
How stupid are you

Yes, you are posting in the request forum, and you have no real, or precise request. How do you expect anyone to guess what you are on about? So your last sentence... Just, no.
broken
S3 licensed
Don't think anyone understood what you were asking for
broken
S3 licensed
Such things, imo, should be requested in the thread of the app you want to download. I bet that nobody knows what you are on about.

What I'm trying to say, in a ruder, simpler, straighter way is this: Stop making pointless threads.
broken
S3 licensed
Okay, the server is up again. BUT: I can't seem to access the database.

Mick, could I ask you to back it up and upload it on the specified URL in your PM, please.

Or, Skype will do the job too, if you will.
MPR with SPR detail + Replay merge tool
broken
S3 licensed
Yesterday (I think) I read that MPR replays give you the final result of what has happened, while SPR ones record how it happens /or something like that/. So, we could have like an option to record SPR-like replays in multiplayer races, in which, really, only our car will matter (of course, other cars should be there too, but they will, in all cases, lag anyway). And only our car will matter because there could be a merge tool, which will accept multiple replays, see which replay is who's (or need us specify it), and merge them appropriately. That way, we can have multiplayer replays, with singleplayer quality, which, IMO, is pretty cool.

Or, to take it to the next level - by filming like this, a button could pop up next to each username (or just one button for all users) - "start filming", or just a red dot, or something, which will bring up a prompt box on the other user, asking if they want to start filming, and automatically send the replay once the "camera-man" decides to stop filming and save the replay. Then, they could be automatically merged.

Hope you get what I mean, cause it probably sounds a bit confusing. ;d
broken
S3 licensed
Well, this is (or at least used to be, we will see) my regular routine, so I don't find it strange at all. xD

But what I do find weird... this library's progress goes mindblowingly fast, and in the meantime, you just decide and update another library.. pssht, just a regular thing, right?
broken
S3 licensed
Quote from DarkTimes :Sorry, I didn't see this question before.

Well no problem at all, I was just curious.

Thanks for all the explanations too, that sounds awesome. ^^
This library actually makes me want to program in a way, it's weird. If it was still named Spark, I'd probably say something stupid like "It gives me the Spark", or some lame flat joke like that.
broken
S3 licensed
Could you please post the error in a code tag. My eyes are pretty much dead from looking at that. Also, without any other code, I doubt anyone will be able to help.

From a first look, I would suggest providing the following functions:
User.set_Distance (and specify which is line 461),
CruiseApp.UpdateDistance (and which is line 882),
CruiseApp.CarUpdate (and which is line 857)

Preferably(for me at least) in PHP tags (it's close enough to C#). But CODE will do too.

Also, please provide the user's distance when it happens (not that I know what could possibly go wrong with their distance, but, you know).
And just a wild guess/thought/whatever you want to call it: Provide the nickname and username as well, just in case.

I guess more things will pop up when you provide those. So, don't be surprised if even more stuff than now are requested.
Last edited by broken, . Reason : CatUpdate -&gt; CarUpdate
broken
S3 licensed
Quote from skywatcher122 :tested nice try darktimes but the character strings has a bug which doesn't show string and end up bug like 1.1.1.4 bug which strings at create btn has a limit

You are seriously not reading, are you? 1.1.1.4's bugs will stay (to say it in the simplest way possible). Get the source and fix it, instead of saying "nice try".
broken
S3 licensed
You would download the latest version, of course (which currently is 1.1, I think).
Also, if you want to get started with the syntax faster, download the one with an example.

But, if you're new at it, you need to know at least the basics of the language you're downloading it for. If not that, then at least the basics of a similar language to it. You don't just grab it and start programming, because that would
1) get you mindeffed and
2) annoy you, which will
3) probably make you post "angry" help threads in which
4) you will get a lot of members annoyed too which can
4.1) make you post more "angry" posts that will get you banned or
4.2) get all your threads deleted, or nobody replying to them.

So, it's almost 100% game over for you.

But if you do know the basics, you can be sure that you will start getting the hang of it sooner or later. It's common sense: You don't know the basics, you don't know what to ask Google, therefore, you don't know what to do, OR, You do start learning the basics, which will get you a bit bored maybe, but in the end you'll be a lot more comfortable when you're doing changes/adding something to the application (and you might actually enjoy it too).

And just a final suggestion: If you want full InSim functionality, you might also want to get InSim.NET, because, even though it may(or may not) have some minor issues, this is currently the most up-to-date .NET library, as far as I'm aware. It is also, currently, the most actively-developed one, so any problems you report, will most likely be looked at & fixed. Also, it's opensource, so you can fix them yourself (if you know what you're doing, of course).
broken
S3 licensed
Can you please post those in your own forum. I don't think this is the place for your progress reports.
broken
S3 licensed
Yes, I do know that many users request help with programming. But so do I, and most of the times, I get it. So, it would be pretty unfair if I got help and didn't give any. I think, once, I even actually swore that I'm never going to help demoers with programming again, but never planned to actually keep that promise anyway.

Seriously, I like helping people, when there's use of it. And I think others on this forum do too. It's really nice if you see that the person you've just helped has learned something thanks to you. Of course, the downside of this is when they just keep insisting on getting the code, without any effort on their side, but those threads usually just die.

And yes, I can think of the improvement suggestions that are going to come from the open-configs. But the sooner the people stop replying with stuff like "boo, stupidest idea ever!!", the sooner the threads will die. Also, it's not "cruisers", it's "people". Your character doesn't depend on what you use a game for. Yes, there are some really unique cases among the cruisers, I definitely agree on that one. But isn't it the same with racers, drifters, etc?
broken
S3 licensed
Quote from bunder9999 :one thing i don't get about cruisers, is that they want a racing simulator to be a driving simulator... what's so cool about driving around on aston pretending it's a real city? there are games which do pretty much everything they want, all they have to do is LUA script their extra missions.

The thing I don't get is - How is that a problem for you?

Also, what if I don't like the idea of learning LUA? I can just give you so many arguments, but in the end, it's going to be the same old "why cruise on a race simulator", well, okay, why open a cruise thread when you are interested only in racing? I believe that my question is much more adequate than yours. But I don't mind if you prove me wrong, with real arguments.
broken
S3 licensed
Quote from Jonathon.provost :i installed that and still the same error

How do you expect someone to help you, if you don't provide the error? Besides that, nobody here is obligated to do so when you don't even try to think at all. Which means, that you are totally out of your right to use emoticons, such as the one on the title of that post. Seriously, you're not that special.
FGED GREDG RDFGDR GSFDG