![]() |
#31 |
User
|
![]() i ddidnt understand this piece here
__________________![]() 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 |
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#32 |
Free Software Terrorist
Technical Director
|
![]() 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 |
![]() |
![]() |
![]() |
#33 |
Free Software Terrorist
Technical Director
|
![]() Fixed some typos, (re)added the solutions to the challenges and a link to the "triggers in JASS" tutorial
__________________ |
![]() |
![]() |
![]() |
#34 |
User
Join Date: Dec 2005
Posts: 151
![]() |
![]() I have some trouble with this:
__________________![]() 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? |
![]() |
![]() |
![]() |
#35 |
.
Respected User
|
![]() ![]() call AddSubstract takes(a,b) Should be ![]() call AddSubstract(a,b) |
![]() |
![]() |
![]() |
#36 |
User
Join Date: Dec 2005
Posts: 151
![]() |
![]() Oh, thanks
__________________![]() |
![]() |
![]() |
![]() |
#37 |
User
Join Date: Aug 2006
Posts: 2
![]() |
![]() |
![]() |
![]() |
![]() |
#38 | |
SpeakerGames.com
|
![]() Quote:
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? |
|
![]() |
![]() |
![]() |
#39 |
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! |
![]() |
![]() |
![]() |
#40 |
Free Software Terrorist
Technical Director
|
![]() 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 |
![]() |
![]() |
![]() |
#41 | |
User
Join Date: Jan 2006
Posts: 46
![]() |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#42 |
Lol I got a custom title!
Join Date: Aug 2004
Posts: 1,236
![]() ![]() ![]() ![]() |
![]() Aye, just noticed it is the same to me
__________________ |
![]() |
![]() |
![]() |
#43 |
Free Software Terrorist
Technical Director
|
![]() 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. |
![]() |
![]() |
![]() |
#44 |
User
Join Date: Jan 2006
Posts: 46
![]() |
![]() So... If I am using Firefox 2, is there anything I can do to fix this?
|
![]() |
![]() |
![]() |
#45 |
Lol I got a custom title!
Join Date: Aug 2004
Posts: 1,236
![]() ![]() ![]() ![]() |
![]() *uses Firefox 1.0.7*
__________________ |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|