The online racing simulator
Insim WTF?????
Hello, I am so confused wth is going of with my insim.

I USE LFS_External.

with the if (!InList) bit i added these:

NewConn.ToyDogs = FileInfo.GetUserT1(NCN.UName);
NewConn.ToyTrains = FileInfo.GetUserT2(NCN.UName);
NewConn.ToyMonkeys = FileInfo.GetUserT3(NCN.UName);

And now nothing works. When i // all them the insim starts working wtf???????
problaby the code is wrong
Right, your code is wrong.
with // you deactivate your code...
do you get any errors?
Applications don't magically break. It's a user error. And if I've learned anything in the years I've been programming - it is that every time something breaks "magically", then you've somehow "magically" fked up.
Quote from broken :"magically" fked up.

lol hahaha

@stuntguy in FileInfo make sure u have



static public void UpdateUserLeave(clsConnection C)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + C.Username + ".txt");
Sw.WriteLine("Cash = " + C.Cash);
Sw.WriteLine("BBal = " + C.BankBalance);
Sw.WriteLine("Cars = " + C.Cars);
Sw.WriteLine("Distance = " + C.TotalDistance);
Sw.WriteLine("Health = " + C.Health);
Sw.WriteLine("Toys = " + C.Toys);
Sw.WriteLine("Stat = " + C.Stat);
Sw.Flush();
Sw.Close();
}

etc. etc. wat ever u have idk cause i tried to make the toys thingy work but its hard to do for me
Quote from marcel1 :Right, your code is wrong.
with // you deactivate your code...
do you get any errors?

no
Quote from mariuba2 :lol hahaha

@stuntguy in FileInfo make sure u have



static public void UpdateUserLeave(clsConnection C)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + C.Username + ".txt");
Sw.WriteLine("Cash = " + C.Cash);
Sw.WriteLine("BBal = " + C.BankBalance);
Sw.WriteLine("Cars = " + C.Cars);
Sw.WriteLine("Distance = " + C.TotalDistance);
Sw.WriteLine("Health = " + C.Health);
Sw.WriteLine("Toys = " + C.Toys);
Sw.WriteLine("Stat = " + C.Stat);
Sw.Flush();
Sw.Close();
}

etc. etc. wat ever u have idk cause i tried to make the toys thingy work but its hard to do for me

this is mine:
static public void UpdateUserLeave(string Username, long Cash, long BankBalance, string Cars, Int32 Distance, int Health, byte Stat, int ToyDogs, int ToyTrains, int ToyMonkeys)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + Username + ".txt");
Sw.WriteLine("Cash = " + Cash);
Sw.WriteLine("BBal = " + BankBalance);
Sw.WriteLine("Cars = " + Cars);
Sw.WriteLine("Distance = " + Distance);
Sw.WriteLine("Health = " + Health);
Sw.WriteLine("Stat = " + Stat);
Sw.WriteLine("ToyDogs = " + ToyDogs);
Sw.WriteLine("ToyTrains = " + ToyTrains);
Sw.WriteLine("ToyMonkeys = " + ToyMonkeys);
Sw.Flush();
Sw.Close();
}

Quote from stuntguy3000 :this is mine:
static public void UpdateUserLeave(string Username, long Cash, long BankBalance, string Cars, Int32 Distance, int Health, byte Stat, int ToyDogs, int ToyTrains, int ToyMonkeys)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + Username + ".txt");
Sw.WriteLine("Cash = " + Cash);
Sw.WriteLine("BBal = " + BankBalance);
Sw.WriteLine("Cars = " + Cars);
Sw.WriteLine("Distance = " + Distance);
Sw.WriteLine("Health = " + Health);
Sw.WriteLine("Stat = " + Stat);
Sw.WriteLine("ToyDogs = " + ToyDogs);
Sw.WriteLine("ToyTrains = " + ToyTrains);
Sw.WriteLine("ToyMonkeys = " + ToyMonkeys);
Sw.Flush();
Sw.Close();
}


i changed it to what you said i should have. i get these errors

The name 'C' does not exist in the current context. HELP!!!!!!
AFAIK the longest on the fileinfo is the 0-8 letters

and I'd rather use
static public void UpdateUserLeave(clsConnection C)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + C.Username + ".txt");
Sw.WriteLine("Cash = " + C.Cash);
Sw.WriteLine("BBal = " + C.BankBalance);
Sw.WriteLine("Cars = " + C.Cars);
Sw.WriteLine("Distance = " + C.TotalDistance);
Sw.WriteLine("Health = " + C.Health);
Sw.WriteLine("Stat = " + C.Stat);
Sw.WriteLine("ToyDogs = " + C.ToyDogs);
Sw.WriteLine("ToyTrains = " + C.ToyTrains);
Sw.WriteLine("ToyMonkeys = " + C.ToyMonkeys);
Sw.Flush();
Sw.Close();
}
Quote from skywatcher122 :AFAIK the longest on the fileinfo is the 0-8 letters

and I'd rather use
static public void UpdateUserLeave(clsConnection C)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + C.Username + ".txt");
Sw.WriteLine("Cash = " + C.Cash);
Sw.WriteLine("BBal = " + C.BankBalance);
Sw.WriteLine("Cars = " + C.Cars);
Sw.WriteLine("Distance = " + C.TotalDistance);
Sw.WriteLine("Health = " + C.Health);
Sw.WriteLine("Stat = " + C.Stat);
Sw.WriteLine("ToyDogs = " + C.ToyDogs);
Sw.WriteLine("ToyTrains = " + C.ToyTrains);
Sw.WriteLine("ToyMonkeys = " + C.ToyMonkeys);
Sw.Flush();
Sw.Close();
}

OMG THANK YOU SO MUCH LOLAGE THANKS SO MUCH!!!!!!!!!! YOU ROCK.

btw... thanks
Quote from stuntguy3000 :this is mine:
static public void UpdateUserLeave(string Username, long Cash, long BankBalance, string Cars, Int32 Distance, int Health, byte Stat, int ToyDogs, int ToyTrains, int ToyMonkeys)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + Username + ".txt");
Sw.WriteLine("Cash = " + Cash);
Sw.WriteLine("BBal = " + BankBalance);
Sw.WriteLine("Cars = " + Cars);
Sw.WriteLine("Distance = " + Distance);
Sw.WriteLine("Health = " + Health);
Sw.WriteLine("Stat = " + Stat);
Sw.WriteLine("ToyDogs = " + ToyDogs);
Sw.WriteLine("ToyTrains = " + ToyTrains);
Sw.WriteLine("ToyMonkeys = " + ToyMonkeys);
Sw.Flush();
Sw.Close();
}


Ok, you've got the solution, but let's resolve the problem too. Why are the Toy variables integers?

When you are passing them to the function, do you know what types of variables they are? I guess that you haven't checked that. I want you to understand this, so you can avoid the same mistakes in the future.
Quote from broken :Ok, you've got the solution, but let's resolve the problem too. Why are the Toy variables integers?

When you are passing them to the function, do you know what types of variables they are? I guess that you haven't checked that. I want you to understand this, so you can avoid the same mistakes in the future.

i did make them int's for a reason: i just did lol

I will get another prob into this

case 164:
//Item 1
foreach (clsConnection C in Connections)
{
if (C.InToy == 1)
{
InSim.Send_MST_Message("/msg ^2•^7 " + C.PlayerName + " ^7Bought a Toy Dog!");
C.ToyDogs += 1;
C.Cash -= 100;
}
if (C.JobToBank == 1 || C.JobToMarket == 1)
{
InSim.Send_MTC_MessageToConnection("^1 You can only do 1 Job at a time!", C.UniqueID, 0);
}
else if (C.InJob == 1)
{
InSim.Send_MST_Message("/msg ^2•^7 " + C.PlayerName + " ^7 Accepted a Job!");
C.JobToMarket = 1;
}


}
break;

why won't it say You can only do 1 Job at a time! when you click the click button more than once? idk why its not stopping it.

TOTAL DUMBNESS FAIL!

The whole time that was working but i has a different code on my insim from whats posted lol

THREAD CLOSED

FGED GREDG RDFGDR GSFDG