private void button4_Click(object sender, EventArgs e) { int b = m.loadScript((byte)nMap.Value, grp); if (b == -1) { MessageBox.Show("That map does not have a script.", "Error"); return; } gb.BufferLocation = m.scriptLocation; gb.WriteByte(bm); MessageBox.Show("Map swapped.", "Success"); panel2.Visible = false; panel1.Visible = true; nScript.Value = (byte)b; }
public frmMapScript(GBHL.GBFile g, int map, int group) { gb = g; grp = group; bm = (byte)map; m = new MapScripts(gb); InitializeComponent(); int b = m.loadScript(map, group); if (b == -1) { panel2.Visible = true; return; } panel1.Visible = true; nScript.Value = (byte)b; }