The online racing simulator
XY positions of tracks
(92 posts, started )
No, sun, the co-ordinates will be being displayed in the application you were viewing the image in. Additionally, the co-ordinates need to be converted to LFS world co-ordinates to be of any use for programmers.
Yes, but it's still only accurate to 5 metres...it's still fairly useful though...
#28 - sun
what programm do i have to use for the co-ordinates
Quote from dougie-lampkin :Yes, but it's still only accurate to 5 metres...it's still fairly useful though...

Unless you provide a zooming functionality that then enlarges a 5m*5m area to the full size of the window for that final bit of accuracy.

Quote from sun :what programm do i have to use for the co-ordinates

There isn't one - that's what dougie-lampkin is making.
#30 - sun
ah ok. Good look dougie-lampkin
hmm...zooming...erm, I'm using the track as the background image on a form, so without taking screenshots of every possible area, how could I enlarge the image? The zoom functionality would be brilliant alright though
Go have a look around the Interwebnet, there are some image resizing packages available - or there may even be some decent-enough functionality built into the framework itself.
Yea, I must explore Visual Studio a bit more, I'm relying on old C++ stuff
#34 - sun
hehe. Cant wait untill its finished the app your making i'll use it so much actually iam on that part now for the co-ordinates. hurry dougie-lampkin hehe
#35 - sun
I have an error when i compiled the InSim:

The name 'x' does not exist in the current context
The name 'x' does not exist in the current context

The name 'y' does not exist in the current context
The name 'y' does not exist in the current context

if any one can help please post.
I could help but sadly you told me not to the other day...
#37 - sun
? yes about that. The reason i told you is because you kept on spamming my threads. And i sm learning and reading books and stuff so please dont tell me any more... ok ?

sorry about other day
Are X and Y declared?
#39 - sun
declared ? what does that mean ?
Defined/declared/set:

Like this:

<type> x = <value>;
<type> y = <value>;

#41 - sun
if (x = 123) (x = 145) (x = 123) (y = 167);
{
// tell them that they're in the lottery ticket pick up position here
}
}
}
}

Thats the code and the under the x's and y's theres a blue line saything the error i said before.
Hmm... that's all a bit wonky to be honest, Sun. What's the code supposed to do anyway?
#43 - sun
its for the lottery tickets
Yes, but what is each part of the code supposed to do? Why are you using X and Y?

Are you trying to say that X should be assigned the value 123, or are you checking to see if X already has that value?

Edit: OK - Well I'm going to presume you are checking to see if they have that value, hence the if statement. This might work...


if ((x == 123) || (x == 145) || (x == 123) || (y == 167))
{
// tell them that they're in the lottery ticket pick up position here
}

#45 - sun
Nope its the same errors
OK, i know what he means and im bored so ill post here...



int X = MCI.Info[0].X;
int Y = MCI.Info[0].Y;

if ((X == 123) && (X == 145) && (Y == 123) && (Y == 167))
{
// tell them that they're in the lottery ticket pick up position here
}

Also sun will you please wait for your book and learn that abit before posting back here
#47 - sun
int X = MCI.Info[0].X;
int Y = MCI.Info[0].Y;
if ((x == 123) && (x == 145) && (x == 123) && (y == 167))
{
// tell them that they're in the lottery ticket pick up position here
}
}
}
}

same error
Make the X and the Y in the 'if' statement capital..............
#49 - sun
what do you mean by that ?
X = capital x, x = non capital x

And btw: That if-statement is bulls***
Somehow you are missing the complete idea behind if statements and you are missing a lot of logical thinking.

If x equals 123 AND x equals 145. What value is x? It can only be one of them.
So either you want X to be 123 or 145 or you want x to be between 123 and 145... I don't know... perhaps you even want something completely different.

Dou you want the position to be inside of a rectangle/line defined by the two points 123/145 and 123/167?
-> if ((Y >= 123) && (Y >= 145) && (Y <= 123) && (y <= 167))

XY positions of tracks
(92 posts, started )
FGED GREDG RDFGDR GSFDG