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 > Resources > - Submit a resource -
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-24-2012, 09:26 PM   #106
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Quote:
Originally Posted by moyack
I don't know how complicated is to code the control and management ofthe initialization order, but it would be nice to have the ability to define priorities in this with a keyword.

Something like this:

Collapse example:
prioritary module MyThingy
    //this module will be processed and placed first than everything
endmodule


I don't see the point of this, every noob system maker out there will decide that his uber-mega module is the one that needs to be on top.

Modules initializers will be called based on library order, so order your libraries, it is as simple as that.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.

Last edited by cohadar : 01-24-2012 at 09:27 PM.
cohadar is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-25-2012, 02:24 AM   #107
bomber7
User
 
Join Date: Sep 2007
Posts: 102

bomber7 is on a distinguished road (12)

Default

A note
Collapse JASS:
/*/**/
According to the C/C++ syntax I assumed that this is modeled after, this should be valid syntax. Any amount of /* should be closed by a single */. However jasshelper spits up an error instead. Just a note.

I know you have more important things to do, but its just something to think about if you get bored.

Last edited by bomber7 : 01-25-2012 at 02:25 AM.
bomber7 is offline   Reply With Quote
Old 01-25-2012, 11:21 AM   #108
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

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

Default

Quote:
Originally Posted by bomber7
According to the C/C++ syntax I assumed that this is modeled after, this should be valid syntax. Any amount of /* should be closed by a single */. However jasshelper spits up an error instead. Just a note.
I don't think so—the JassHelper manual explicitly states that block comments can be nested.

Last edited by BBQ : 01-25-2012 at 11:22 AM.
BBQ is offline   Reply With Quote
Old 01-25-2012, 12:01 PM   #109
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

Provided that an endblock is also included.
Bribe is offline   Reply With Quote
Old 01-25-2012, 03:48 PM   #110
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

About the returned boolean stuff with .evaluate mentioned in the SpellEvent thread :

It doesn't make sense that it actually doesn't return the expected result of the evaluation.
It was a wtf moment, the first time i tried to use it.

Now, you can evaluate functions which don't return booleans, i suppose it should return true in this case.
__________________
Cool != Useful

Last edited by Troll-Brain : 01-25-2012 at 03:49 PM.
Troll-Brain is offline   Reply With Quote
Old 01-26-2012, 07:47 AM   #111
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Evaluated function that crashed should most probably just return zero values.
This is how it is done in other languages at least.

boolean -> false
integer -> 0
handles -> null
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 01-26-2012, 03:48 PM   #112
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

TriggerEvaluate a trigger which is crashing before the condition return == false.

So i don't see where is the problem, just use the boolean given by TriggerEvaluate.
In fact you even don't need a boolean variable, you can simply inline the TriggerEvaluate call.

There is nothing wrong with a return true in a such protype function, because even if there is the same prototype within the same trigger (action), trigger actions are executed only if an event fired the trigger AND all the conditions returned true.
But if you TriggerEvaluate, even if all the conditions return true, the actions are not executed.
That's why we have to use if TriggerEvaluate... then ... call TriggerExecute... to completly fire a trigger manually.
__________________
Cool != Useful

Last edited by Troll-Brain : 01-26-2012 at 04:13 PM.
Troll-Brain is offline   Reply With Quote
Old 01-26-2012, 04:27 PM   #113
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

I can't seem to grasp the intention of your request.

Can you tell me exactly what is it that you want.
Please include some code examples too.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 01-26-2012, 08:00 PM   #114
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

Collapse JASS:
library Test initializer init

    private function NoReturn takes nothing returns nothing
        local integer i
        call BJDebugMsg("NoReturn")
        //set i = i               // uncomment the line for a thread crash
    endfunction
    
    private function IntegerReturn takes nothing returns integer
        local integer i
        call BJDebugMsg("IntegerReturn")
        //set i = i               // uncomment the line for a thread crash
        return 1
    endfunction
    
    private function BooleanReturn takes nothing returns boolean
        local integer i
        call BJDebugMsg("BooleanReturn")
        //set i = i               // uncomment the line for a thread crash
        return true
    endfunction
    
    private function init takes nothing returns nothing
        local integer i
        call TriggerSleepAction(0) // for messages in chatbox
        
        /* this feature is currently not supported but you could implement it, it won't break backward compatibility,
           since in jass you can ignore the return value, now i don't care that much if you don't implement it,
           i just find it as a good way to make sure the function didn't crash
           
        if NoReturn.evaluate() then // it means that NoReturn didn't crash
            call BJDebugMsg("NoReturn : no crash")
        else
            call BJDebugMsg("NoReturn : crash")
        endif
        
        */
        set i = IntegerReturn.evaluate()
        call BJDebugMsg("i == " + I2S(i))
        if BooleanReturn.evaluate() then // when a prototype function which returns a boolean is called, it makes sense that we can use the boolean
            call BJDebugMsg("BooleanReturn : true")
        else
            call BJDebugMsg("BooleanReturn : false")
        endif
    endfunction
    
endlibrary

How it compiles :

Expand JASS:

How it should be imho (only relevant code is there) :

Expand JASS:
__________________
Cool != Useful
Troll-Brain is offline   Reply With Quote
Old 01-27-2012, 06:00 AM   #115
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

All very logical and practical, added to the TODO list.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 06-20-2014, 05:45 PM   #116
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

Quote:
Originally Posted by cohadar
No!
That message is there for a reason.

Leaving //! external active in your code recreates abilities on every save,
and it makes jasshelper to be called twice.

This makes your map compiling time last 10 seconds instead of 1 second.
So the message is there to help you, it is a WARNING, not an error.

Besides I blame it on people who put ability generation scripts inside their system code.
I'll just go and hassle Earth-Fury over this.

EDIT:
The += and -= are meaningless now, just use for loops.
I will not patch this myself. I will accept any patches for this which replicate the ease and configurability of my library. Even at the time, it was a performance loss... which is why it includes the ability to disable external calls through a variable. You only need to enable the calling of externals if you changed the configuration! This is well-said in the readme of the library. Unless you broke something, it should still work.

Quote:
Originally Posted by Earth-Fury
You will want to close your map after the first time you save it with BonusMod in it, reopen it, and disable ability (re)generation in the configuration section. If you fail to do that, a small delay will be added every time you save your map.
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils


Last edited by Earth-Fury : 06-20-2014 at 05:48 PM.
Earth-Fury 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 09:34 AM.


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

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