Virtual Class Declaration errors

About Monkey 2 Forums Monkey 2 Programming Help Virtual Class Declaration errors

This topic contains 4 replies, has 4 voices, and was last updated by  Jesse 2 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4455

    peterigz
    Participant

    Was just updating TimelineFX to work with 1.08 and getting an error in the c compiler “constructors cannot be declared virtual [-fpermissive]”. So what I was doing was putting Virtual after the class name which as a result is now complaining that the “New” method cannot be declared virtual (worked ok before). Is there something I can do to make the New method not virtual or will I have to just start putting virtual after individual methods instead?

    This code replicates the error:

    Thanks!

    #4456

    Mark Sibly
    Keymaster

    I must’ve broken something – will fix.

    #4458

    Mark Sibly
    Keymaster

    Ok just committed a potential fix for this, although you’ll have to rebuildall or rebuildmx2cc.

    #4548

    MikeHart
    Participant

    I have a similar problem. With v1.02 it compiled fine. Current version gives this error:

    Super class ‘fanotmX2.cftTween.TweenEquationCall’ has no default constructor

    If I add a New method to it, it still gives this error.

    #4550

    Jesse
    Participant

    You need a constructor in the “TweenEquationCallLinear”

    thats the error I get when I try to check for errors. I added the “Method New()” and the error went away.

    For safety purpose you should add a default constructor to all of your classes. if you don’t you might run into something similar when you try to implement something similar with other classes.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.