HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

CS/vJASS Bug...

09-29-2007, 02:11 PM#1
Malf
I just updated to JASSNewGenPack 3g from 3b, and when I saved the map it gives me an error saying:

"Functions passed to Filter or Condition must return a boolean"

Collapse JASS:
    function DamagerGroup_Enum takes nothing returns nothing
        call GroupAddUnit(bj_groupAddGroupDest , GetFilterUnit())
    endfunction

    function DamagerGroup_DoDamage takes nothing returns nothing
     local timer t=GetExpiredTimer()
     local string k=I2S(CS_H2I(t))

     local group g=CreateGroup()
     local group a=CS_CopyGroup(GetTableGroup(k , "G"))
     local group arg=CreateGroup()
     local unit p
     local unit u=GetTableUnit(k , "hur")
     local real x=GetStoredReal(cs_cache , k , "are")
     local real dm
     local integer d
     local boolean trees=GetStoredBoolean(cs_cache , k , "trees")
     local boolexpr bex=Condition(function DamagerGroup_Enum)
      ...

Umm what's wrong?
09-29-2007, 02:30 PM#2
Fireeye
A boolexpr need a function returning a boolean value and in your case it returns nothing.
09-29-2007, 02:40 PM#3
Malf
I know that, but why does Vex do that thing? What is he doing using DamageGroup_Enum as a condition?

I have never had this problem before when I save with newgen 3b and I just updated to 3g and I find this error.
09-29-2007, 02:47 PM#4
Anitarf
That's because 3g has a new version of PJass that considers this an arror, this is due to recent discoveries that suggest that doing this causes macs to desync. The caster system has not yet been updated to accomodate for this.
09-29-2007, 03:12 PM#5
Toadcop
Quote:
doing this causes macs to desync
NOT ONLY MACs =\
09-29-2007, 03:34 PM#6
cohadar
Also on Amiga, Solaris and Commodore64...
09-29-2007, 05:23 PM#7
Captain Griffen
And is very bad practice to start with.
09-29-2007, 07:51 PM#8
Vexorian
Quote:
Originally Posted by Captain Griffen
And is very bad practice to start with.
Why would it be a bad practice? Before the desync there was no reason at all to use a boolean there and add redundant lines of code, and even with the desync it is not that much of a big deal...