[Scripting] 'Numeric type expected' error

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Scripting] 'Numeric type expected' error

Re: [Scripting] 'Numeric type expected' error

by MTrop » Tue Feb 09, 2016 10:00 pm

Thanks for the error log anyway, guys!

Re: [Scripting] 'Numeric type expected' error

by Graf Zahl » Tue Feb 09, 2016 1:55 pm

I've never seen this particular gem before, so hopefully nobody...

Re: [Scripting] 'Numeric type expected' error

by Xaser » Tue Feb 09, 2016 1:42 pm

I've logged this issue in Square's Trello board. We'll get it fixed mod-side, though I've no idea who else might be affected by this.

Re: [Scripting] 'Numeric type expected' error

by Graf Zahl » Sat Feb 06, 2016 2:03 pm

Ok. This is still a modding bug, though. I'll check if the parser allows quoted strings as constant names and if that's not the case re-add it, because I wouldn't be surprised if that mistake was made more often. Then adding a new SoundSlot5 constant to patch this over would be a minor addition.

But don't expect me to do such things for every occurence like this.

Re: [Scripting] 'Numeric type expected' error

by _mental_ » Sat Feb 06, 2016 1:40 pm

Graf Zahl wrote:The only question is: What does the scripting branch do? Play nothing or play something wrong?
If you mean the post-merge master branch it plays nothing. Before merge it played sounds, at wrong slot I guess.

Re: [Scripting] 'Numeric type expected' error

by Graf Zahl » Sat Feb 06, 2016 12:03 pm

These constructs do not work correctly in 2.8.0. The game never defines a constant "SoundSlot", so it's inevitably 0, meaning it'll play on the first free channel (a.k.a. CHAN_AUTO)

The only question is: What does the scripting branch do? Play nothing or play something wrong?

Re: [Scripting] 'Numeric type expected' error

by Edward-san » Sat Feb 06, 2016 11:56 am

Well, considering everything, it's not that bad. The old mods will work till 2.8, then the new mods must take account of the changes. The 3-episode adventure of square game is in development, isn't it? isn't it?

... maybe it's worth considering the next version being 3.0..

Re: [Scripting] 'Numeric type expected' error

by HavoX » Sat Feb 06, 2016 11:50 am

Graf Zahl wrote:Here's only one course of action: Fix the mod, leave the parser alone.
So be it, we'd say.

Re: [Scripting] 'Numeric type expected' error

by Ed the Bat » Sat Feb 06, 2016 11:42 am

wildweasel wrote:Shit, I wonder how many of my mods are doing this by accident.
None of the ones I've worked on for you, I promise.

Re: [Scripting] 'Numeric type expected' error

by Graf Zahl » Sat Feb 06, 2016 11:26 am

_mental_ wrote:
Gez wrote:What they did never worked right; and if a workaround is added to make it load anyway it should still at least print a warning.
The problem is that it's working in 2.7.1 and 2.8.0. I agree that it must not work. But who knows how many mods are exploiting this bug.

What? It selected slot 5? Really? I'd rather think it did the same as it does now: Selecting slot 0!

Re: [Scripting] 'Numeric type expected' error

by wildweasel » Sat Feb 06, 2016 11:18 am

Shit, I wonder how many of my mods are doing this by accident.

Re: [Scripting] 'Numeric type expected' error

by _mental_ » Sat Feb 06, 2016 11:17 am

Gez wrote:What they did never worked right; and if a workaround is added to make it load anyway it should still at least print a warning.
The problem is that it's working in 2.7.1 and 2.8.0. I agree that it must not work. But who knows how many mods are exploiting this bug.

Re: [Scripting] 'Numeric type expected' error

by Graf Zahl » Sat Feb 06, 2016 10:55 am

Gez wrote:and if a workaround is added to make it load anyway it should still at least print a warning.
That it already does. Here's only one course of action: Fix the mod, leave the parser alone.

Re: [Scripting] 'Numeric type expected' error

by Graf Zahl » Sat Feb 06, 2016 10:53 am

I don't see how this can be fixed without breaking the parser.

Re: [Scripting] 'Numeric type expected' error

by Gez » Sat Feb 06, 2016 10:50 am

_mental_ wrote:Since merging of scripting branch a bunch of 'Numeric type expected' errors are printed into the console when running Adventure of Square.
Spoiler: The complete error log

Yeah it's a real user error:

Code: Select all

	TNT1 A 0 A_PlaySound("ambience/fountain", "SoundSlot5", 0.5, 1)  
They basically confused the API for [wiki]A_PlaySound[/wiki] and [wiki]A_PlaySoundEx[/wiki]. APSX uses string names for the channels, APS uses constant identifiers. What they did never worked right; and if a workaround is added to make it load anyway it should still at least print a warning.

Top