Bad Numeric Constant [SOLVED]

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
KalebNoobMaster
Posts: 49
Joined: Sun Mar 07, 2010 5:01 pm
Location: Oklahoma

Bad Numeric Constant [SOLVED]

Post by KalebNoobMaster »

I keep getting "Script error, "DUR_KNM.pk3:sndinfo" line 8:
SC_GetFloat: Bad numeric constant "$AMBIENT"."
Spoiler:

When I see nothing wrong with this....
Last edited by KalebNoobMaster on Tue Oct 09, 2012 4:49 pm, edited 1 time in total.
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

Re: Bad Numeric Constant

Post by jpalomo »

$ambient index logicalsound type mode <volume>

It's interpreting the $ambient on the next line as the volume. Obviously $ambient isn't a number.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Bad Numeric Constant

Post by Enjay »

[edit] beaten to it :P [/edit]

Errors like this usually mean something is wrong on the previous line. In this case, ZDoom is reporting that $AMBIENT is a bad numeric constant because it was expecting the previous line to finish with a number but the line didn't finish with a number so ZDoom just looked at the next arguement it could find and discovered $AMBIENT which, obviously, is not a number.

What's wrong? You are missing the volume argument from your ambient sound definitions. eg

$AMBIENT 141 sfxsource/evilbass1 POINT CONTINUOUS 1.0
User avatar
KalebNoobMaster
Posts: 49
Joined: Sun Mar 07, 2010 5:01 pm
Location: Oklahoma

Re: Bad Numeric Constant

Post by KalebNoobMaster »

Enjay wrote:[edit] beaten to it :P [/edit]

Errors like this usually mean something is wrong on the previous line. In this case, ZDoom is reporting that $AMBIENT is a bad numeric constant because it was expecting the previous line to finish with a number but the line didn't finish with a number so ZDoom just looked at the next arguement it could find and discovered $AMBIENT which, obviously, is not a number.

What's wrong? You are missing the volume argument from your ambient sound definitions. eg

$AMBIENT 141 sfxsource/evilbass1 POINT CONTINUOUS 1.0
Ohhhh. I'm a bit rusty when it comes to lump editing :oops: . Thanks for the help!
Locked

Return to “Editing (Archive)”