C
C#•2mo ago
Black in Italian

Error CS1502; Unity Mobile Developement

How do I fix this?
public class DLLocalizationManager : LocalizationManager
{
public DLLocalizationManager(IHttpClient httpClient, IAppInfo appInfo) : base(default(IHttpClient), default(IAppInfo), default(Localization), default(LocalizationManager.CsvMode), default(LocalizationManager.CsvLoadedDelegate))
{
}

}
public class DLLocalizationManager : LocalizationManager
{
public DLLocalizationManager(IHttpClient httpClient, IAppInfo appInfo) : base(default(IHttpClient), default(IAppInfo), default(Localization), default(LocalizationManager.CsvMode), default(LocalizationManager.CsvLoadedDelegate))
{
}

}
"has some invalid arguments" thanks Unity
27 Replies
Angius
Angius•2mo ago
Check what the base class constructor actually wants, because CS1502 means you're giving it something it does not want As a side note, with the default, you're giving it a bunch of nulls
Black in Italian
Black in Italian•2mo ago
hmmmmm okay I'll give it a try. I love your name btw
Angius
Angius•2mo ago
Helps me hide at the botton of the user list lol
Black in Italian
Black in Italian•2mo ago
hey random question, I'm REALLY new to programming, does fixing something make other errors be discovered in Unity because I had 2 errors I fixed thinking they were my last one, I was like yes I'm a genious, and then 3 more popped up
Angius
Angius•2mo ago
Sometimes fixing an error does cause another error to appear, yes We call it "progress" lol If you're as new as you claim to be, I'd recommend not starting with Unity though
Black in Italian
Black in Italian•2mo ago
error CS1729: The type SocialPoint.Utils.PriorityQueue<T,System.Action>' does not contain a constructor that takes 0' arguments also occurs here, and I don't know what it means this unfortunately is the ONLY thing I want to do as far as programming goes, I'm just trying to get an abandonware mobile game running
Angius
Angius•2mo ago
It means the constructor of the PriorityQueue class takes some parameters There's no constructor with zero of them
Black in Italian
Black in Italian•2mo ago
fuck okay
Angius
Angius•2mo ago
So, again, look at the class, look at it's constructors, see which one you want to use Which is something you'd learn were you to start by learning C#, not by learning Unity 😛
Black in Italian
Black in Italian•2mo ago
using System;

namespace SocialPoint.Utils
{
public class PriorityAction<T> : PriorityQueue<T, Action>
{
}
}
using System;

namespace SocialPoint.Utils
{
public class PriorityAction<T> : PriorityQueue<T, Action>
{
}
}
so the constrictures are T and Action here right?
Angius
Angius•2mo ago
Constructors And no $structure
MODiX
MODiX•2mo ago
namespace Namespace;

[Attribute]
public class Class
{
public string PublicField;
private bool _privateField;

public int PublicProperty { get; set; }

public Class() {} // Constructor

public void Method(int parameter)
{
var localVariable = parameter;
}
}
namespace Namespace;

[Attribute]
public class Class
{
public string PublicField;
private bool _privateField;

public int PublicProperty { get; set; }

public Class() {} // Constructor

public void Method(int parameter)
{
var localVariable = parameter;
}
}
Black in Italian
Black in Italian•2mo ago
lol hmm okay, that makes sense! maybe I need a bracket to seperate it
Angius
Angius•2mo ago
A class will inherit the constructors of the parent class
Black in Italian
Black in Italian•2mo ago
using System; namespace SocialPoint.Utils { public class { PriorityAction<T> : PriorityQueue<T, Action> } { } } this looks really bad
Angius
Angius•2mo ago
If there are no ctors in PriorityAction, there might be ctors in PriorityQueue It does look bad and won't even compile, you're right
Black in Italian
Black in Italian•2mo ago
oh goodness okay what is a ctor
Angius
Angius•2mo ago
constructor
Black in Italian
Black in Italian•2mo ago
okay i feel like i need to undo work now lol let me think
Angius
Angius•2mo ago
That's where source control comes in clutch, but I don't suppose you use source control So ctrl-z what you can ig
Black in Italian
Black in Italian•2mo ago
namespace SocialPoint.Utils
{
public class PriorityAction : PriorityAction<int>
{
}
}
namespace SocialPoint.Utils
{
public class PriorityAction : PriorityAction<int>
{
}
}
so I think this is where the ctor comes from and then ummmmm PriorityQueue inherets it here maybe I might manually do it, I already had a blunder changing MonoBehaviour to UnityEngineMonoBehaviour instead of PhotonMonoBehaviour and had to just restart basically thankfully there's only a couple things I really need to change this would probably be an easy project for someone who knew C#
Angius
Angius•2mo ago
Possibly
Black in Italian
Black in Italian•2mo ago
I might call it a night thank you ZZZZZZZZZZZZZZZZZZ actually I have a quick question how morally ambiguous is it to edit someone's code that I didn't make to play a game like where does the line between decompiling and just well the code was there start and if I use someone else's code, is that morally bad in the programming world
Angius
Angius•2mo ago
Does the game permit such modifications explicitly?
Black in Italian
Black in Italian•2mo ago
no lol
Angius
Angius•2mo ago
Then it's not legal Morality of it is up for debate
Black in Italian
Black in Italian•2mo ago
that's good to know thank you I will be the only one playing it, and my sister, so I am morally okay with it
Want results from more Discord servers?
Add your server
More Posts
Installing an App to unlock USB debuggingHello. I have a strange problem. I was given a task at work that requires me to display the screen I'd like to ask for a little help from someone who has used the HttpServer classI'm trying to implement this class in te Godot game engine but I can't make it receive http requestsUnity MonoBehaviour and Photon ConfusionI don't know how to program, but I'm trying to get an old Unity mobile game to run that seems to havList not returning all matching elementshey, I have this method ``` public List<T> GetStatementsOfType<T>() where T : ASTStatement { retCurrently Issues with Mapping (Mapperly), in debug mode when call made to API it exitsRepo: https://github.com/Mozin0/ProjectManagement/tree/main/ProjectManagement SubTasks mapping doessans-io pattern in .NET libraryI'm a big fan of writing sans-io implementations https://sans-io.readthedocs.io/ of various protocolALPHABETIC TELEPHONE NUMBER TRANSLATOR for ClassI have been trying to figure this out for a few days now. Here is the full question: "Many companiesReusing of types between GraphQL and RestHey, I'm currently working on some graphql mutations in my backend. The thing is that we support ResRedis.OM Indexes are dropped automaticallyI create index using `Redis.OM` , after some time they are deleted for no reason ``` Provider.ConnecThe name 'InitializeComponent' does not exist in the current contextI was working with a WPF project and this error suddenly appeared. I can't run this project anymore