Error CS1502; Unity Mobile Developement
How do I fix this?
"has some invalid arguments" thanks Unity
27 Replies
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 null
shmmmmm okay I'll give it a try. I love your name btw
Helps me hide at the botton of the user list lol
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
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
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 runningIt means the constructor of the
PriorityQueue
class takes some parameters
There's no constructor with zero of themfuck
okay
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 😛
so the constrictures are T and Action here right?
Constructors
And no
$structure
lol
hmm okay, that makes sense!
maybe I need a bracket to seperate it
A class will inherit the constructors of the parent class
using System;
namespace SocialPoint.Utils
{
public class
{
PriorityAction<T> : PriorityQueue<T, Action>
}
{
}
}
this looks really bad
If there are no ctors in
PriorityAction
, there might be ctors in PriorityQueue
It does look bad and won't even compile, you're rightoh goodness okay
what is a ctor
constructor
okay
i feel like i need to undo work now lol
let me think
That's where source control comes in clutch, but I don't suppose you use source control
So ctrl-z what you can ig
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#
Possibly
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
Does the game permit such modifications explicitly?
no lol
Then it's not legal
Morality of it is up for debate
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