# [Evaluated] [Assignment] Week 1

Status
Not open for further replies.

#### Chaosy

Tutorial Reviewer
Level 40
sup, I did the assinment but yeah I didn't like your script I hope you dont mind so I created my own little function and it works just as it should.

JASS:
``````globals
integer a = 1
integer b = 2
integer c = 3
integer d = 4
integer e = 5
integer f = 6
integer SomeOddMath
endglobals

function IHateMath takes nothing returns nothing
set SomeOddMath =  f / e * d / c * b - a
call BJDebugMsg(I2S(SomeOddMath))
call BJDebugMsg(I2S(a))
call BJDebugMsg(I2S(b))
call BJDebugMsg(I2S(c))
call BJDebugMsg(I2S(d))
call BJDebugMsg(I2S(e))
call BJDebugMsg(I2S(f))
endfunction``````

#### Attachments

• Map 1.w3x
16.6 KB · Views: 8

#### Chaosy

Tutorial Reviewer
Level 40
what?

"What's 6 / 5 * 4 / 3 * 2 - 1?" that's exactly what I did

edit: also is ok that I remake the triggers since my new gen is bugging and I can't test the map then
edit 2: nvm fixed but id prefer to work with functions insted of textmacros if that's ok afterall that's how I will work after the class if I make it that far

Last edited:

#### Magtheridon96

Level 36
That part was rhetorical
Most people didn't see what I did there, so I added a note at the end:

Me said:
Note: I'm not asking you to evaluate the given expression. This was a rhetorical question.

The real assignment is to figure out the order of the JASS operators and write a mod function.

#### Chaosy

Tutorial Reviewer
Level 40
well, I might have misunderstood something then the order or operators is
first () then * or / then + or - or that's not what you mean?

Status
Not open for further replies.

Replies
5
Views
756
Replies
7
Views
881
Replies
1
Views
194
Replies
3
Views
482
Replies
8
Views
1K