Wc3C.net Introduction to JASS
 User Name Remember Me? Password
 Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar

06-07-2006, 03:18 PM   #31
samir555
User

Join Date: Mar 2006
Posts: 11

i ddidnt understand this piece here

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!!!

06-07-2006, 03:22 PM   #32
Vexorian
Free Software Terrorist

Technical Director

Join Date: Apr 2003
Posts: 14,898

Submissions (37)

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
__________________
 Wc3 map optimizer 5.0 Someone should fix .wav sound in this thing. JassHelper 0.A.2.A Turns your simple code into something that is complicated enough to work.
 Wc3 map optimizer 5.0 JassHelper 0.A.2.A Xye 0.12.1 | Editor/Levels xe0.9 CS16.0 My spells jEdit modes for vJass&Zinc (v9) WarCiTy 0.2.0
Faster != more useful

06-14-2006, 04:26 PM   #33
Vexorian
Free Software Terrorist

Technical Director

Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Fixed some typos, (re)added the solutions to the challenges and a link to the "triggers in JASS" tutorial
__________________
 Wc3 map optimizer 5.0 Someone should fix .wav sound in this thing. JassHelper 0.A.2.A Turns your simple code into something that is complicated enough to work.
 Wc3 map optimizer 5.0 JassHelper 0.A.2.A Xye 0.12.1 | Editor/Levels xe0.9 CS16.0 My spells jEdit modes for vJass&Zinc (v9) WarCiTy 0.2.0
Faster != more useful

 07-07-2006, 10:42 AM #34 PhoenixFeather User     Join Date: Dec 2005 Posts: 151 I have some trouble with this: 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...
 07-07-2006, 10:52 AM #35 Blade.dk .   Respected User   Join Date: May 2005 Posts: 1,990 Submissions (15) JASS:` call AddSubstract takes(a,b)` Should be JASS:` call AddSubstract(a,b)` __________________ Spell Making Course: Part 1: Making a simple stomp spell. I wonder if I'll ever finish part 2.
 07-07-2006, 02:39 PM #36 PhoenixFeather User     Join Date: Dec 2005 Posts: 151 Oh, thanks __________________ Mostly inactive due to final exams...
 08-06-2006, 06:04 PM #37 Chrono Trigger User     Join Date: Aug 2006 Posts: 2 I need help to use Jasscraft Help me ivboettner@yahoo.com.ar
09-08-2006, 11:58 PM   #38
The)TideHunter(
SpeakerGames.com

Join Date: Mar 2006
Posts: 1,328

Submissions (1)

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...

 09-17-2006, 05:07 AM #39 Aazimir User     Join Date: Sep 2006 Posts: 14 [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!
09-17-2006, 12:17 PM   #40
Vexorian
Free Software Terrorist

Technical Director

Join Date: Apr 2003
Posts: 14,898

Submissions (37)

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
__________________
 Wc3 map optimizer 5.0 Someone should fix .wav sound in this thing. JassHelper 0.A.2.A Turns your simple code into something that is complicated enough to work.
 Wc3 map optimizer 5.0 JassHelper 0.A.2.A Xye 0.12.1 | Editor/Levels xe0.9 CS16.0 My spells jEdit modes for vJass&Zinc (v9) WarCiTy 0.2.0
Faster != more useful

11-08-2006, 04:54 AM   #41
The-Cata
User

Join Date: Jan 2006
Posts: 46

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.)

 11-08-2006, 09:14 PM #42 Thunder_Eye Lol I got a custom title!     Join Date: Aug 2004 Posts: 1,236 Aye, just noticed it is the same to me __________________
11-08-2006, 09:22 PM   #43
Vexorian
Free Software Terrorist

Technical Director

Join Date: Apr 2003
Posts: 14,898

Submissions (37)

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.
__________________
 Wc3 map optimizer 5.0 Someone should fix .wav sound in this thing. JassHelper 0.A.2.A Turns your simple code into something that is complicated enough to work.
 Wc3 map optimizer 5.0 JassHelper 0.A.2.A Xye 0.12.1 | Editor/Levels xe0.9 CS16.0 My spells jEdit modes for vJass&Zinc (v9) WarCiTy 0.2.0
Faster != more useful

 11-09-2006, 12:19 AM #44 The-Cata User     Join Date: Jan 2006 Posts: 46 So... If I am using Firefox 2, is there anything I can do to fix this?
 11-09-2006, 04:37 PM #45 Thunder_Eye Lol I got a custom title!     Join Date: Aug 2004 Posts: 1,236 *uses Firefox 1.0.7* __________________