private void button5_Click(object sender, EventArgs e) { counter = int.Parse(SavingPlugin.GetVariable("counter", TypeCode.Int16, "awwdad").ToString()); counter++; SavingPlugin.SaveVariable("counter", TypeCode.Int16, counter, "awwdad"); string randomname = "code" + counter; Console.WriteLine(counter); SavingPlugin.SaveVariable(randomname, TypeCode.String, RandomString(6), "awwdad"); // write lines of text to the file MessageBox.Show(SavingPlugin.GetVariable(randomname, TypeCode.String, "awwdad").ToString()); }
private void button1_Click(object sender, EventArgs e) { try { counters = int.Parse(SavingPlugin.GetVariable("counter", TypeCode.Int16, "awwdad").ToString()); } catch { counters = 0; SavingPlugin.SaveVariable("counter", TypeCode.Int16, counters, "awwdad"); } counters++; SavingPlugin.SaveVariable("counter", TypeCode.Int16, counters, "awwdad"); string randomname = "code" + counters; SavingPlugin.SaveVariable(randomname, TypeCode.String, RandomString(6), "awwdad"); // write lines of text to the file MessageBox.Show(SavingPlugin.GetVariable(randomname, TypeCode.String, "awwdad").ToString()); }