C
C#β€’13mo ago
PhoenixXeme

❔ Error

what dose this error mean because i have no idea
32 Replies
ZacharyPatten
ZacharyPattenβ€’13mo ago
we need more info/context. when is the error happening? when you try to open a windows forms designer?
ffmpeg -i me -f null -
ffmpeg -i me -f null -β€’13mo ago
i guess he was creating his component
PhoenixXeme
PhoenixXemeβ€’13mo ago
when i drag the control form onto form1
PhoenixXeme
PhoenixXemeβ€’13mo ago
ZacharyPatten
ZacharyPattenβ€’13mo ago
share your code for DarkRPReportForm
PhoenixXeme
PhoenixXemeβ€’13mo ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Scarlet_Nixie
{
public partial class DarkRPReportForm : UserControl
{

NotepadForm notepadForm;

public DarkRPReportForm(NotepadForm notepad)
{
notepadForm = notepad;
InitializeComponent();
}

string name = "";
string steamID = "";
string link = "";

private void btnReportName_Click(object sender, EventArgs e)
{
name = btnReportName.Text;
}

private void tbReportName_TextChanged(object sender, EventArgs e)
{

}

private void btnReportID_Click(object sender, EventArgs e)
{
steamID = tbReportID.Text;
}

private void tbReportID_TextChanged(object sender, EventArgs e)
{

}

private void btnReportLink_Click(object sender, EventArgs e)
{
link = tbReportLink.Text;
}

private void tbReportLink_TextChanged(object sender, EventArgs e)
{

}

private void btnReportDone_Click(object sender, EventArgs e)
{
notepadForm.tbNotepadMain.Text = $"In-game name: PhoenixXeme \r\nName of the player(s) you are reporting: {name}\r\n\nSteam ID of the player(s) you are reporting: {steamID}\r\nHave you or the other player(s) involved made an in-game report to resolve the issue? No Admins\r\nIf so which staff member handled the report? None\r\nServer(wipe or main server): Server 2\r\nDate of the event (dd/mm/yy): \r\nTime of the event (BST): \r\nAny details regarding the event: No\r\nAny evidence to support your case: {link}";
this.Hide();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Scarlet_Nixie
{
public partial class DarkRPReportForm : UserControl
{

NotepadForm notepadForm;

public DarkRPReportForm(NotepadForm notepad)
{
notepadForm = notepad;
InitializeComponent();
}

string name = "";
string steamID = "";
string link = "";

private void btnReportName_Click(object sender, EventArgs e)
{
name = btnReportName.Text;
}

private void tbReportName_TextChanged(object sender, EventArgs e)
{

}

private void btnReportID_Click(object sender, EventArgs e)
{
steamID = tbReportID.Text;
}

private void tbReportID_TextChanged(object sender, EventArgs e)
{

}

private void btnReportLink_Click(object sender, EventArgs e)
{
link = tbReportLink.Text;
}

private void tbReportLink_TextChanged(object sender, EventArgs e)
{

}

private void btnReportDone_Click(object sender, EventArgs e)
{
notepadForm.tbNotepadMain.Text = $"In-game name: PhoenixXeme \r\nName of the player(s) you are reporting: {name}\r\n\nSteam ID of the player(s) you are reporting: {steamID}\r\nHave you or the other player(s) involved made an in-game report to resolve the issue? No Admins\r\nIf so which staff member handled the report? None\r\nServer(wipe or main server): Server 2\r\nDate of the event (dd/mm/yy): \r\nTime of the event (BST): \r\nAny details regarding the event: No\r\nAny evidence to support your case: {link}";
this.Hide();
}
}
}
ZacharyPatten
ZacharyPattenβ€’13mo ago
you have to have a cunstructor with no parameters add a public DarkRPReportForm() {}
PhoenixXeme
PhoenixXemeβ€’13mo ago
i keep hearing about cunstructors but i have no idea what they are
ZacharyPatten
ZacharyPattenβ€’13mo ago
constructors are special methods. the ones where the name of the method is the same as the name of the type
PhoenixXeme
PhoenixXemeβ€’13mo ago
ZacharyPatten
ZacharyPattenβ€’13mo ago
that is a constructor yes but you also need one that takes no parameters
PhoenixXeme
PhoenixXemeβ€’13mo ago
oh
PhoenixXeme
PhoenixXemeβ€’13mo ago
PhoenixXeme
PhoenixXemeβ€’13mo ago
so like that?
ZacharyPatten
ZacharyPattenβ€’13mo ago
add InitializeComponent(); too inside the new constructor
PhoenixXeme
PhoenixXemeβ€’13mo ago
is that it?
ZacharyPatten
ZacharyPattenβ€’13mo ago
save it and try to add it to your form again
PhoenixXeme
PhoenixXemeβ€’13mo ago
still get this
ZacharyPatten
ZacharyPattenβ€’13mo ago
also, you generally shouldnt be putting forms inside of forms you should be making user controls
PhoenixXeme
PhoenixXemeβ€’13mo ago
it is a user control
ZacharyPatten
ZacharyPattenβ€’13mo ago
good πŸ™‚ try rebuilding your code
PhoenixXeme
PhoenixXemeβ€’13mo ago
i did and i cleaned it
ZacharyPatten
ZacharyPattenβ€’13mo ago
okay well you still messed something up but it is hard to tell what without seeing it. can you share the full code? preferably via github repo link
PhoenixXeme
PhoenixXemeβ€’13mo ago
i cant due to it having some personel stuff on it
ZacharyPatten
ZacharyPattenβ€’13mo ago
understood, but that will make it harder for us to help are you sure the code is building without any errors?
PhoenixXeme
PhoenixXemeβ€’13mo ago
ZacharyPatten
ZacharyPattenβ€’13mo ago
sorry I am out of ideas at the moment without being able to see the full code and replicate the issue. when you run into issues like this, sometimes it is a good practice to strip things down into a smaller example that still replicates the issue. if you did that then you could share the stripped down version of code that is having the issue with us
Patrick
Patrickβ€’13mo ago
@phoenixxeme is this for GMod DarkRP?
PhoenixXeme
PhoenixXemeβ€’13mo ago
what told you that XD
PhoenixXeme
PhoenixXemeβ€’13mo ago
@ZP β–‘β–’β–“β–ˆβ”œβ– ΜΆΛΎΜΆΝžβ– β”€β–ˆβ–“β–’β–‘ when i remove "this" and the "NotepadForm notepad" arg it works and lets me drag it
PhoenixXeme
PhoenixXemeβ€’13mo ago
Accord
Accordβ€’13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ Truncatehow do I Truncate a float to an int, I tried this ``` public int maxGap = 4; maxGap = 4 + decima❔ how could I make very nice looking apps in c#what could I use to make very visually appealing apps in c# i want things such as animations, round❔ Using .NET android workload with LinuxWhen trying to build the android project in https://github.com/StereoKit/StereoKit.Templates/tree/ma❔ How to modify aspnetcorehealthcheck to add devices programmatically.I have aspnetcorehealthcheck on a .net core app. Everything works fine. How would we go about and❔ Should procedural 2d maps be with structs or instantiated with 'new'?I am creating a game that can sometimes have a 1000x1000 interior grids in width and height. Exterioβœ… public readonly bool Equals(...)? - SOLVEDI created struct for my needs of representing a phone number prefix and intellisense offered me a "p❔ How to display All the integers in a list concatenated with a stringHello! I was wondering if there was a possible way of cancatenating elements inside a list (that are❔ pick up and drop objects in top down perspective (unity 2d)I'm trying to make a top down game on unity and i want the player to be able to pick up one item at ❔ Need help trying to make 2D car move from above```cs // { if (Input.GetKeyDown(KeyCode.W) == true) { myRigidbody.velociEF Core: Keep Copy of Entity with old state when updatingHello, I am trying to update an entity and keep its previous state as a copy disconnected from the d