A_Chase doesn't accept "" for missing state

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: A_Chase doesn't accept "" for missing state

Re: A_Chase doesn't accept "" for missing state

by Graf Zahl » Sun Dec 09, 2007 3:42 am

It didn't work anyway. I fixed it for real now by making offset 0 and the empty strings synonymous for 'no state passed'.

Re: A_Chase doesn't accept "" for missing state

by randi » Sat Dec 08, 2007 4:10 pm

Oh? That's why you did that? In that case, sorry, but I'm reverting your change. 'None' was always meant to represent nothing in the name table, not ''.

In this case, as far as I can tell, the real bug is that SC_CheckNumber() considered "" to be the number 0, so the example usage with "" was being treated as if 0 had been used instead.

Re: A_Chase doesn't accept "" for missing state

by Graf Zahl » Tue Nov 20, 2007 2:27 am

A_Chase was a special case because it needs a (none) value. But for sounds it's essentially the same but there specifying a non-existing sound was the same as specifying nothing so it didn't matter.

Re: A_Chase doesn't accept "" for missing state

by Matt » Mon Nov 19, 2007 9:34 pm

Graf Zahl wrote:"" is supposed work. The problem is simple: It checks for the name constant 0 - which unfortunately is not "" as one might think but "none". But please DO NOT use that! This has been annoying me for ages so I'm going to change it to "" as it should be.
Does this apply to other strings that can take null values (e.g., certain sound specifications and cancelling out inherited properties)?

Re: A_Chase doesn't accept "" for missing state

by Graf Zahl » Mon Nov 19, 2007 2:32 pm

"" is supposed work. The problem is simple: It checks for the name constant 0 - which unfortunately is not "" as one might think but "none". But please DO NOT use that! This has been annoying me for ages so I'm going to change it to "" as it should be.

A_Chase doesn't accept "" for missing state

by MartinHowe » Mon Nov 19, 2007 1:20 pm

I have a monster that has only a melee attack but want flag 16 ("stay still"). When specifying the missile state:

Using BOSS C 2 A_Chase("Melee", "" , 16) gives a "negative jump offset" error.
Using BOSS C 2 A_Chase("Melee", None, 16) gives a "string constant expected" error.
Using BOSS C 2 A_Chase("Melee", Null, 16) gives a "string constant expected" error.
Using BOSS C 2 A_Chase("Melee", "NULL", 16) works, but only because "NULL" is an undefined state label and the log file is littered with errors to that effect.
Using BOSS C 2 A_Chase("Melee", 0, 16) gives a "negative jump offset" error.

If the official way to specify "there isn't one" for one of the states is broken, please fix it :)
If there is no official way to specify "there isn't one" for one of the states, please add one :)
If there is, please tell me what it is.

Top