The online racing simulator
#1 - ab12
AutoMessages from .txt file
Hello, I have this code in my insim and is not going as I want.

switch(Stage)
{
case 1:
if(Msg1 != "")
{
insim.Send("/msg " + Msg1);
Stage += 1;
}
else //if Msg1 is null, send message 2
insim.Send("/msg " + Msg2);
Stage += 1;

break;

case 2:
if(Msg2 != "")
{
insim.Send("/msg " + Msg2);
Stage += 1;
}
break;

case 3:
if(Msg3 != "")
{
insim.Send("/msg " + Msg3);
Stage = 1;
}
break;
}

Any help please ? Smile
You are missing the curly brackets in the else.

That's the only weird thing I see without knowing any details about the issue.
#3 - ab12
The code work and without the curly brackets mate Smile
I bet you don't want to increase Stage 2 times if (stage==0) and if(Msg1 != "").

You keep avoiding telling any useful information, we don't even know what your problem is.
Don't even bother...

He can't be bothered to explain what it should do, what it doesn't do, or any context at all.
#6 - ab12
Quote from Bose321 :Don't even bother...

He can't be bothered to explain what it should do, what it doesn't do, or any context at all.

If Msg1 from .txt file is empty i want insim to send Msg2 from .txt file

Sorry for my bad english Frown

FGED GREDG RDFGDR GSFDG