wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-10-2011, 09:40 AM   #3601
Monkey D. Coder
User
 
Join Date: Jun 2011
Posts: 1

Monkey D. Coder has little to show at this moment (0)

Default

Greetings to all, i would like to report a problem that i got (i don't know if this has been talked about before), this prevented my map to run with +1.24, the solution was obvious.

Jasshelper gave me no errors


Collapse JASS:
globals
handle myHandle
endglobals

function someF1 takes player pl returns force
    local force f=CreateForce()
    call ForceAddPlayer(f,pl)
    set myHandle=f
    set f=null
    return myHandle
endfunction

function someF2 takes trigger myTrigger,rect r returns event
    local region myRegion=CreateRegion()
    call RegionAddRect(myRegion,r)
    set myHandle=TriggerRegisterEnterRegion(myTrigger,myRegion,null)
    set myRegion=null
    return myHandle
endfunction

function someF3 takes rect r,boolexpr myBooEx returns group
    local group g=CreateGroup()
    call GroupEnumUnitsInRect(g,r,myBooEx)
    call DestroyBoolExpr(myBooEx)
    set myHandle=g
    set g=null
    return myHandle
endfunction

Last edited by Monkey D. Coder : 06-10-2011 at 02:12 PM.
Monkey D. Coder is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-10-2011, 05:08 PM   #3602
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 233

Submissions (1)

Bribe will become famous soon enough (30)Bribe will become famous soon enough (30)

Send a message via AIM to Bribe
Default

JassHelper also wrongly won't let stuff like this compile (though the problem is found in pJass):

Collapse JASS:
'\''
'\\'
function foo takes nothing returns boolean
    if true then
        return false //Thinks a return is missing, but normal JASS can handle this
    endif
endfunction
Bribe is offline   Reply With Quote
Old 06-30-2011, 01:05 PM   #3603
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

I'm having problems with JassHelper in JNGP on my map. If I save it as is, it gives me some non-existant errors, with lines of code broken or fused with each other, duplicated, new lines with wrong syntax or, simply, garbled text (this only in Jasshelper's window). If I remove some triggers, the errors change, if I remove enough triggers, the map compiles without errors. I tried switching JASS parsers, but the error is still there. Copying all the stuff over to a new map would work? Any suggestions?
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 06-30-2011 at 01:06 PM.
Michael Peppers is offline   Reply With Quote
Old 06-30-2011, 01:20 PM   #3604
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Vexorian can't really help you if you don't supply the map with the errors. Ideally, you should try replicating the error in a new map with a bare minimum of triggers (by copying the triggers that cause the error in the original map and seeing if they do the same in a new map), but the original map should do as well, although you are unlikely to get help in either case since Vex doesn't look at the site much anymore, but if the map is simple enough maybe I could take a look at it.
__________________
Anitarf is offline   Reply With Quote
Old 06-30-2011, 02:18 PM   #3605
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

Quote:
Originally Posted by Anitarf
Vexorian can't really help you if you don't supply the map with the errors. Ideally, you should try replicating the error in a new map with a bare minimum of triggers (by copying the triggers that cause the error in the original map and seeing if they do the same in a new map), but the original map should do as well, although you are unlikely to get help in either case since Vex doesn't look at the site much anymore, but if the map is simple enough maybe I could take a look at it.
Fact is, I don't think any of the triggers in the map are to blame, they've always been there, they've always compiled cleanly and I just made some small tweaks to them these days. Also, one of the random errors pointed at the map-generated triggers, which ended abruptly with garbled text, thus my bet is that the map is corrupted.

And no, the map's triggers are awfully complicated, so I won't blame you if you don't want to take a look at it. If you want to look anyway, tell me when you've downloaded it, as I've put a lot of effort in this map and I'm not comfortable with unprotected versions of it floating around in the web.

Edited because: Map removed.
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 06-30-2011 at 03:34 PM.
Michael Peppers is offline   Reply With Quote
Old 06-30-2011, 03:57 PM   #3606
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Well, I tried saving the map and it saved without any errors, so the problem appears to be on your end. I suggest you update your JassHelper and/or reinstall NewGen. If that doesn't help, it could be an operating system issue, I'm using Win XP.
__________________
Anitarf is offline   Reply With Quote
Old 06-30-2011, 04:15 PM   #3607
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

Quote:
Originally Posted by Anitarf
Well, I tried saving the map and it saved without any errors, so the problem appears to be on your end. I suggest you update your JassHelper and/or reinstall NewGen. If that doesn't help, it could be an operating system issue, I'm using Win XP.
All righty then, will do, thanks. (And sorry for wasting your time)

(Note to self: stop using Windows stuff from an ext3 drive, it causes them to go crazy)
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 06-30-2011 at 04:20 PM.
Michael Peppers is offline   Reply With Quote
Old 08-08-2011, 04:29 AM   #3608
The_Chosen_Oreo
User
 
Join Date: Jul 2010
Posts: 3

The_Chosen_Oreo has little to show at this moment (0)

Default

Just a little question because I can't get vJass to work because of the "Unrecognized PJASS (syntax) error", what are structs converted to in regular JASS?
The_Chosen_Oreo is offline   Reply With Quote
Old 08-08-2011, 08:31 AM   #3609
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by The_Chosen_Oreo
Just a little question because I can't get vJass to work because of the "Unrecognized PJASS (syntax) error", what are structs converted to in regular JASS?
Structs are basically a set of parallel arrays with autogenerated allocator and deallocator functions for getting unique indexes (struct instances) for those arrays. Static methods are converted to functions, regular methods are converted to functions with an extra integer argument at the start.
__________________
Anitarf is offline   Reply With Quote
Old 09-20-2011, 08:38 PM   #3610
krainert
User
 
Join Date: Dec 2009
Posts: 5

krainert has little to show at this moment (0)

Default

Any chance we'll see interface extension in vJass at some point?

Last edited by krainert : 09-20-2011 at 08:39 PM.
krainert is offline   Reply With Quote
Old 09-21-2011, 11:47 AM   #3611
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 233

Submissions (1)

Bribe will become famous soon enough (30)Bribe will become famous soon enough (30)

Send a message via AIM to Bribe
Default

Interfaces can already be extended what are you talking about?
Bribe is offline   Reply With Quote
Old 10-22-2011, 07:27 AM   #3612
xorkatoss
User
 
Join Date: Aug 2010
Posts: 5

xorkatoss has little to show at this moment (0)

Default

hmmm...im having toubles downloading the program...i can't extract it o.O
xorkatoss is offline   Reply With Quote
Old 10-22-2011, 09:16 AM   #3613
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by xorkatoss
hmmm...im having toubles downloading the program...i can't extract it o.O
Do you have 7-zip? It is required to extract .7z files.
__________________
Anitarf is offline   Reply With Quote
Old 11-18-2011, 06:16 PM   #3614
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 164

Barade is on a distinguished road (14)

Default

If you write:
Collapse JASS:
struct TestBase
    public stub method bla takes nothing returns nothing
    endmethod
endstruct

struct Test extends TestBase
    public method anotherOne takes nothing returns nothing
        call super.bla()
    endmethod

    public stub method bla takes nothing returns nothing
    endmethod
endstruct
it says
Quote:
Line x: Since you added [forcemethodevaluate] to jasshelper.conf, calling methods "from above their declaration" requires you to add .evaluate, correct this mistake.
Line x: You may alternatively edit jasshelper.conf and remove that option.
although I am calling the paren'ts "bla" using "super".

Furthermore:
Collapse JASS:
struct Test extends TestBase
    public method anotherOne takes nothing returns nothing
        call super.bla.evaluate() // syntax error
    endmethod

    public stub method bla takes nothing returns nothing
    endmethod
endstruct
cannot be used. Of course you can simply change the order of the methods since it's just an example!

There's another bug when calling constructors of private structs of a library from another struct's constructor which is declared in the same library, as well if those structs are declared AFTER the struct where you're calling the constructors from:
Collapse JASS:
library test
    struct Test
        private Test2 member

        public static method create takes nothing returns thistype
            local thistype this = thistype.allocate()
            set this.member = Test2.create.evaluate() // won't work since Test2 is private which doesn't make any sense to me
            return this
        endmethod
    endstruct

    private struct Test2 // removing "private" helps to avoid this bug
    endstruct
endlibrary

In 0.A.2.B I always get the following error which prevents me from using it:
Quote:
Line 30624: Unexpected : "
Line 30624: (At generated code): constant string s__Asl_website= "https:
30624 | public static constant string website = "https://gitorious.org/advanced-script-library"
This error doesn't occur using 0.A.2.A.

Btw. can someone confirm that using:
Collapse JASS:
globals
constant string test = GetLocalizedString("sadas")
endglobals
crashes the game in map selection?

Although this project doesn't seem to be maintained anymore it might be useful to report these bugs, anyway. I myself would continue developing JassHelper if it wasn't written in Pascal/Delphi/Windows dependent stuff.
I just want to say that there's at least me out there who still uses vJass for his project(s).
__________________
Barade is offline   Reply With Quote
Old 11-18-2011, 08:04 PM   #3615
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

That's what keyword is for:
Collapse JASS:
library Test
    private keyword Test2
    struct Test
        private Test2 member

        public static method create takes nothing returns thistype
            local thistype this = thistype.allocate()
            set this.member = Test2.create.evaluate() // Works now.
            return this
        endmethod
    endstruct

    private struct Test2
        static method create takes nothing returns thistype
            return .allocate() // It won't work unless you declare a custom create method.
        endmethod
    endstruct
endlibrary

Regarding the problem with the constant string, it seems to incorrectly identify // inside the string as a comment. You can just write the url without the "https://" part, it works just as well. If you absolutely must have that, you can use string concatenation to work around the issue.
__________________
Anitarf is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 07:45 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services