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 12-19-2008, 11:17 AM   #1246
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Quote:
Originally Posted by Vexorian
If I had to choose between just using .release and having to open that XP virtual machine to add stuff to jasshelper, I would stick to release, it is actually cute.
You are unable to modify jasshelper now? wtf...
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 12-26-2008, 10:12 PM   #1247
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

I've been using the VM to code jasshelper for a long time, but I've been feeling unmotivated to do that stuff, maybe after the hero contest.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 12-28-2008, 08:31 PM   #1248
Themis
User
 
Join Date: Nov 2006
Posts: 36

Themis has little to show at this moment (5)

Default

I might have an idea that might optimize the jass code a lot, and shouldn't be a lot of work.

Collapse JASS:
function example takes real x y facing, unit u returns nothing
Converts to:
Collapse JASS:
function example takes real x, real y, real facing, unit u returns nothing

As in many languages you don't have to re-declare the type of variable, but separate it with a comma. However due to free type declaration it should be easier to detect when a comma isn't used.
Themis is offline   Reply With Quote
Old 12-30-2008, 12:58 PM   #1250
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Just like you'd make an array of any other type.

Collapse JASS:
globals
     mystruct array A
endglobals
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 12-31-2008, 03:15 PM   #1251
Zerzax
Zerzy
 
Zerzax's Avatar
 
Join Date: Mar 2008
Posts: 708

Submissions (2)

Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)

2008 Spell olympics - Fire - SilverSpell Making Session 13 WinnerSpell Making Session 12 Winner

Send a message via AIM to Zerzax Send a message via MSN to Zerzax
Default

This might be a bug in the compiler: I declared an array within a struct with a limit of 3, and use indices 1, 2, and 3 in the script. I get a syntax error claiming that 3 is an array index out of bounds, while I can use a loop and never directly reference index 3 and JassHelper has no problems with that.
__________________
Some Quotes of Worthy Wisdom:

1. Die - D2 Barbarian
2. Time to Die - D2 Barbarian
3. Too Much Baggage! - D1 Warrior
4. I Gotta Pawn Some of This Stuff! - D1 Warrior
Zerzax is offline   Reply With Quote
Old 12-31-2008, 03:31 PM   #1252
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Size 3: Use indexes 0,1,2

Programming is often 0-based.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 12-31-2008, 07:37 PM   #1253
Zerzax
Zerzy
 
Zerzax's Avatar
 
Join Date: Mar 2008
Posts: 708

Submissions (2)

Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)

2008 Spell olympics - Fire - SilverSpell Making Session 13 WinnerSpell Making Session 12 Winner

Send a message via AIM to Zerzax Send a message via MSN to Zerzax
Default

I forgot to mention that this array is of another struct type. I was under the impression that I should avoid using index 0 in struct arrays because I've had MUI and double free issues when doing so. Doesn't mean I'm right, but...

EDIT: Does this mean I've been going out of array bounds when using the "limiting" index of an array (3 for example, in a loop)?
__________________
Some Quotes of Worthy Wisdom:

1. Die - D2 Barbarian
2. Time to Die - D2 Barbarian
3. Too Much Baggage! - D1 Warrior
4. I Gotta Pawn Some of This Stuff! - D1 Warrior

Last edited by Zerzax : 12-31-2008 at 07:40 PM.
Zerzax is offline   Reply With Quote
Old 12-31-2008, 09:14 PM   #1254
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,514

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

Quote:
Originally Posted by Zerzax
I forgot to mention that this array is of another struct type. I was under the impression that I should avoid using index 0 in struct arrays because I've had MUI and double free issues when doing so. Doesn't mean I'm right, but..
If you have this:
Collapse JASS:
globals
    keyword MyStruct
    MyStruct array MyStructs
endglobals

struct MyStruct
    integer Blah
endstruct
Then MyStruct(0) is different from MyStructs[0] because one is an array lookup (no problems there) and one is direct access to an instance of the struct, and 0 is, unless I'm mistaken. never used as a struct instance.

Quote:
Originally Posted by Zerzax
EDIT: Does this mean I've been going out of array bounds when using the "limiting" index of an array (3 for example, in a loop)?
If you mean you're doing this, then yes:
Collapse JASS:
struct Blah
    integer  array Stuff[3]
endstruct

function Garrr takes nothing returns nothing
    local Blah B = Blah.create()
    local integer J = 0

    loop
       set J = J+1
       exitwhen J > 3
       set Blah.Stuff[J] = GetRandomInt(0, 10)
    endloop
endfunction
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Old 12-31-2008, 09:40 PM   #1255
Zerzax
Zerzy
 
Zerzax's Avatar
 
Join Date: Mar 2008
Posts: 708

Submissions (2)

Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)

2008 Spell olympics - Fire - SilverSpell Making Session 13 WinnerSpell Making Session 12 Winner

Send a message via AIM to Zerzax Send a message via MSN to Zerzax
Default

Good thing I raised the point, that would hurt my Hero Contest judging if I ever got there.

I was doing this:

Collapse JASS:
struct flaremissile 
endstruct

struct caster
    flaremissile array castMissiles[3]

    method Garrrr takes nothing returns nothing
        local integer i = 1
        local flaremissile f 
        
        loop
            exitwhen i > 3
            set f = this.castmissiles[i]
            // actions...
            set i = i + 1
        endloop
    endmethod
endstruct


I wasn't really being specific enough when I said struct arrays. I believe when you use the 0 index in this case, it is exactly as you described Pyro (never used as a struct instance).
__________________
Some Quotes of Worthy Wisdom:

1. Die - D2 Barbarian
2. Time to Die - D2 Barbarian
3. Too Much Baggage! - D1 Warrior
4. I Gotta Pawn Some of This Stuff! - D1 Warrior

Last edited by Zerzax : 12-31-2008 at 09:41 PM.
Zerzax is offline   Reply With Quote
Old 12-31-2008, 09:52 PM   #1256
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
I was under the impression that I should avoid using index 0 in struct arrays because I've had MUI and double free issues when doing so. Doesn't mean I'm right, but...
Perhaps you were using index N on arrays of size N and that caused your issues with index zero.





Quote:
EDIT: Does this mean I've been going out of array bounds when using the "limiting" index of an array (3 for example, in a loop)?
Yes.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 12-31-2008, 10:08 PM   #1257
Zerzax
Zerzy
 
Zerzax's Avatar
 
Join Date: Mar 2008
Posts: 708

Submissions (2)

Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)Zerzax is a jewel in the rough (192)

2008 Spell olympics - Fire - SilverSpell Making Session 13 WinnerSpell Making Session 12 Winner

Send a message via AIM to Zerzax Send a message via MSN to Zerzax
Default

I'll start using indices 0 to Limit - 1 instead now. Thanks to both of you :D.
__________________
Some Quotes of Worthy Wisdom:

1. Die - D2 Barbarian
2. Time to Die - D2 Barbarian
3. Too Much Baggage! - D1 Warrior
4. I Gotta Pawn Some of This Stuff! - D1 Warrior
Zerzax is offline   Reply With Quote
Old 01-01-2009, 01:19 PM
Vexorian
This message has been deleted by Vexorian. Reason: that moron...
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 04:10 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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