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 > Tutorials > JASS/AI scripts tutorials
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-07-2006, 03:18 PM   #31
samir555
User
 
samir555's Avatar
 
Join Date: Mar 2006
Posts: 11

samir555 has little to show at this moment (0)

Send a message via AIM to samir555
Default

i ddidnt understand this piece here

Collapse JASS:
function Trig_JASS_test_Actions takes nothing returns nothing
 local integer a = 2
 local integer array b
    set b[a] = 5
    set b[a+1] = 7
    set b[a+2] = b[a+1]-b[a] 
    set b[1356] = b[a+2] + 335
    call DisplayTextToForce( GetPlayersAll(), I2S(b[a]) )
    call DisplayTextToForce( GetPlayersAll(), I2S(b[a+1]) )
    call DisplayTextToForce( GetPlayersAll(), I2S(b[a+2]) )
    call DisplayTextToForce( GetPlayersAll(), I2S(b[1356]) )
endfunction

i just dont get how if b is the array it comes firrst when a is the integer. it just dioesnt make sense id like this to be explained tyty
__________________
CLASSIFIED INFORMATION

Beware what your about to see is nothing ever witnessed before.
ULTRA TOP SECRETHIDDEN

YAY FOR WOS; WORLD OF STARCRAFT




2000 Marine Defence


OMG FREE BEER!!!
samir555 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-07-2006, 03:22 PM   #32
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 don't think I understand the question if you mean why b[a] ? well that's the syntax it is like saying the element number a of the b array.

5
7
2
337
__________________
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 06-14-2006, 04:26 PM   #33
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

Fixed some typos, (re)added the solutions to the challenges and a link to the "triggers in JASS" tutorial
__________________
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 07-07-2006, 10:42 AM   #34
PhoenixFeather
User
 
PhoenixFeather's Avatar
 
Join Date: Dec 2005
Posts: 151

PhoenixFeather has little to show at this moment (7)

Default

I have some trouble with this:

Collapse JASS:
function Msg takes string s returns nothing
    call DisplayTextToForce( GetPlayersAll(), s )
endfunction

function AddSubstract takes integer a, integer b returns nothing
   set udg_r1=a+b
   set udg_r2=a-b
endfunction

function Trig_JASS_test_Actions takes nothing returns nothing
 local integer a=14
 local integer b=56
    call AddSubstract takes(a,b)
    call Msg("a= "+I2S(a))
    call Msg("b= "+I2S(b))
    call Msg("The Addition is "+I2S(udg_r1))
    call Msg("The Substraction is "+I2S(udg_r2))
endfunction

When I save the map, it gives me a compile error saying Line 92: expected '('. Line 92 is call AddSubstract takes (a,b). What am I doing wrong?
__________________
Mostly inactive due to final exams...
PhoenixFeather is offline   Reply With Quote
Old 07-07-2006, 10:52 AM   #35
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

Collapse JASS:
    call AddSubstract takes(a,b)

Should be

Collapse JASS:
    call AddSubstract(a,b)
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline   Reply With Quote
Old 07-07-2006, 02:39 PM   #36
PhoenixFeather
User
 
PhoenixFeather's Avatar
 
Join Date: Dec 2005
Posts: 151

PhoenixFeather has little to show at this moment (7)

Default

Oh, thanks
__________________
Mostly inactive due to final exams...
PhoenixFeather is offline   Reply With Quote
Old 08-06-2006, 06:04 PM   #37
Chrono Trigger
User
 
Chrono Trigger's Avatar
 
Join Date: Aug 2006
Posts: 2

Chrono Trigger has a little shameless behaviour in the past (-3)

Default

I need help to use Jasscraft
Help me
ivboettner@yahoo.com.ar
Chrono Trigger is offline   Reply With Quote
Old 09-08-2006, 11:58 PM   #38
The)TideHunter(
SpeakerGames.com
 
The)TideHunter('s Avatar
 
Join Date: Mar 2006
Posts: 1,328

Submissions (1)

The)TideHunter( is a jewel in the rough (160)The)TideHunter( is a jewel in the rough (160)

Send a message via MSN to The)TideHunter(
Default

Quote:
Originally Posted by Chrono Trigger
I need help to use Jasscraft
Help me
ivboettner@yahoo.com.ar

Right.
I need help with sleep
Help me
ireallyneedhelp@help.me

You need to say what needs helping, and we'll send you a PM or post here.
Whats going wrong? what do you need help with?
__________________
Big plans...
The)TideHunter( is offline   Reply With Quote
Old 09-17-2006, 05:07 AM   #39
Aazimir
User
 
Aazimir's Avatar
 
Join Date: Sep 2006
Posts: 14

Aazimir has little to show at this moment (0)

Default

[quote=Anitarf]As far as I remember, the fibonacci sequence is only defined that each next number is a sum of two prequels, and the first two numbers are defined as you please. There are therefore infinite fibonacci sequences, but the most "common" is indeed 1,1,2,3,5... but I think you can easily have 1,3,4,7,11,18...

QUOTE]

You cant have 1,3. you would need 1,1,2 to make 3!
Aazimir is offline   Reply With Quote
Old 09-17-2006, 12:17 PM   #40
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

why?

you can have the def
an= an-1 + an-2

then you obviously need to define a1 and a2 and they can be whatever arbitrary number you want
__________________
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 11-08-2006, 04:54 AM   #41
The-Cata
User
 
The-Cata's Avatar
 
Join Date: Jan 2006
Posts: 46

The-Cata has little to show at this moment (4)

Default

Quote:
Originally Posted by Vexorian
The blizzard.j functions work the same way as your functions, blizzard.j is used by the game before your map's script so you can call them as you call any function.

common.j functions are natives and are declared like functions, they are only different in their declaration because they have the name native instead of function.

But when calling them you use the same rules as when calling any function.

Some of the things we have used are common.j natives:
After this part in the tutorial, the page starts to break up. It repeats trigger and JASS windows and is completely unreadable. (Screenshot will be supplied if needed.) Any idea why this happens? (Doesnt happen on any other tutorial or website, happens on any computer I try.)
The-Cata is offline   Reply With Quote
Old 11-08-2006, 09:14 PM   #42
Thunder_Eye
Lol I got a custom title!
 
Thunder_Eye's Avatar
 
Join Date: Aug 2004
Posts: 1,231

Thunder_Eye has a spectacular aura about (88)Thunder_Eye has a spectacular aura about (88)Thunder_Eye has a spectacular aura about (88)

Default

Aye, just noticed it is the same to me
__________________
Thunder_Eye is offline   Reply With Quote
Old 11-08-2006, 09:22 PM   #43
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

It doesn't happen to me, I would blame your web browser for that. Sorry but I can't fix browser bugs.

Edit: Tested on Firefox 2 and Opera.
__________________
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 11-09-2006, 12:19 AM   #44
The-Cata
User
 
The-Cata's Avatar
 
Join Date: Jan 2006
Posts: 46

The-Cata has little to show at this moment (4)

Default

So... If I am using Firefox 2, is there anything I can do to fix this?
The-Cata is offline   Reply With Quote
Old 11-09-2006, 04:37 PM   #45
Thunder_Eye
Lol I got a custom title!
 
Thunder_Eye's Avatar
 
Join Date: Aug 2004
Posts: 1,231

Thunder_Eye has a spectacular aura about (88)Thunder_Eye has a spectacular aura about (88)Thunder_Eye has a spectacular aura about (88)

Default

*uses Firefox 1.0.7*
__________________
Thunder_Eye 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 11:44 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