View Issue Details

IDProjectCategoryView StatusLast Update
0000377Gameplay + OpenGL[All Projects] Bugpublic2017-03-05 20:09
ReporterMajor Cooke 
Assigned To 
PriorityimmediateSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Summary0000377: Const qualifiers causing compile issues
Description
Class PowerDemonAmp : PowerLightAmp
{
    override bool IsBlinking()
    {
        if (!Owner.CountInv("DemonMorphFlashed"))
        {	return true;	}
        return Super.IsBlinking();
    }
}


I was using this for a while since 2.3.2, and now this no longer works.

Worse yet, D4D is now completely broken.

http://archive.allods2.eu/d4d/

Additional InformationScript error, "D4D.pk3:zd4d/debug.txt" line 68:
Can't call play function A_Log from data context
Script error, "D4D.pk3:zd4d/debug.txt" line 90:
Can't call play function A_LogInt from data context
Script error, "D4D.pk3:zd4d/debug.txt" line 131:
Can't call play function Destroy from data context
Script error, "D4D.pk3:zd4d/pinata.txt" line 173:
Expression must be a modifiable value
Script error, "D4D.pk3:zd4d/pinata.txt" line 183:
Expression must be a modifiable value
Script error, "D4D.pk3:zd4d/pinata.txt" line 191:
Expression must be a modifiable value
Script error, "D4D.pk3:zd4d/monsters/monsterbase.txt" line 101:
Can't call play function A_SpawnItemEx from data context
TagsNo tags attached.

Relationships

Activities

Major Cooke

Major Cooke

2017-03-04 08:27

reporter   ~0000856

...Okay I should have mentioned 'runtime' issues. In short, these changes are breaking mods based on 2.3.2 right off the bat. Not good.
Graf Zahl

Graf Zahl

2017-03-04 10:26

administrator   ~0000857

I see the main design flaw in the system.

A struct may not impose a usage type by itself, only the instance must.
Major Cooke

Major Cooke

2017-03-04 11:35

reporter   ~0000859

That's not the only problem. People who are already using things like the above powerup example will have to deal with this:

AEoDdat.pk3:zaeod/powerup.txt, line 1019: Attempt to change const qualifier for virtual function isBlinking
Graf Zahl

Graf Zahl

2017-03-04 11:40

administrator   ~0000860

That one falls under 'wasn't in an official release'. The isBlinking function was only introduced in 2.4pre and I explicitly warned about the risk of such issues happening.
Major Cooke

Major Cooke

2017-03-04 11:41

reporter   ~0000861

That's fair. Adding const fixed that issue, but what are we supposed to do about things like this?

Script error, "AEoDdat.pk3:zaeod/powerup.txt" line 1021:
Can't call play function CountInv from data context


The Owner.CountInv is throwing an error.
Graf Zahl

Graf Zahl

2017-03-04 17:26

administrator   ~0000864

Still under discussion.
Graf Zahl

Graf Zahl

2017-03-05 15:09

administrator   ~0000871

The version I got works again, it's approx. 2 weeks old.
Major Cooke

Major Cooke

2017-03-05 20:09

reporter   ~0000878

Last edited: 2017-03-05 20:09

View 2 revisions

http://archive.allods2.eu/d4d/

Try this one, which is about a week old.

Issue History

Date Modified Username Field Change
2017-03-04 08:24 Major Cooke New Issue
2017-03-04 08:27 Major Cooke Note Added: 0000856
2017-03-04 10:26 Graf Zahl Note Added: 0000857
2017-03-04 11:35 Major Cooke Note Added: 0000859
2017-03-04 11:40 Graf Zahl Note Added: 0000860
2017-03-04 11:41 Major Cooke Note Added: 0000861
2017-03-04 17:26 Graf Zahl Note Added: 0000864
2017-03-05 15:09 Graf Zahl Status new => resolved
2017-03-05 15:09 Graf Zahl Resolution open => fixed
2017-03-05 15:09 Graf Zahl Note Added: 0000871
2017-03-05 20:09 Major Cooke Note Added: 0000878
2017-03-05 20:09 Major Cooke Note Edited: 0000878 View Revisions