| 07-10-2005, 07:43 PM | #1 |
For multishot I'd like the amount of targets to change each level. It normally has 7 every time. Code:
constant function MultiShot_MaximumTargets takes integer l returns integer
return 5+2*l //// The Maximum number of Targets
endfunctionI was thinking more like 1+1*level ( so lvl 1 is 2 , lvl 2 is 3 ect) but couldn't get it to work. I tried the below example but that just gave errors ( I'm not exactly the best at JASS :\ ). Code:
constant function MultiShot_MaximumTargets takes real level returns real
return 1+1*level //// The Maximum number of Targets
endfunctionAny ideas? |
| 07-10-2005, 11:08 PM | #2 |
The only explanation would be that you pasted the function thus creating a new one instead of just modiffying it, cause the contents of the code you pasted don't seem to have any problem at all |
| 07-11-2005, 02:08 AM | #3 |
Yeah I did paste :\. Is there anyway around what I did to fix it? I tried deleting the trigger and taking in a new version from the spellmap and then editing it with the same compile errors. Also tried editing it from within the spellmap and then bringing it to my map with the same issue. |
| 07-11-2005, 03:37 PM | #4 |
I don't think you understood what I said, I was talking about the config function not about the whole trigger |
| 07-11-2005, 07:26 PM | #5 |
vex i have the same problem i cant set the level. it doesnt say level, it just says the formula.. i dont see anything defined by level there :/ |
| 07-11-2005, 11:29 PM | #6 |
I figured out the damn thing. First Setreal, why the heck did you change the return value to real? IT was fine Code:
constant function MultiShot_MaximumTargets takes integer l returns integer
return 5+2*l //// The Maximum number of Targets
endfunctionl (An "El" letter is an integer that determines the level. so Code:
constant function MultiShot_MaximumTargets takes integer l returns integer
return 1+1*l //// The Maximum number of Targets
endfunctionWas the way to do so, without doing lame things like changing return values of functions. Vile it is that l argument, that's the level |
| 07-12-2005, 12:59 PM | #7 |
ahhhhhhhhhhhhhhhhhhhhhhhhh ffs! i thought it was ONE not an EL! |
| 07-13-2005, 12:16 AM | #8 |
you can rename it to level if you want, but change it in the return value too, and don't change the return and argument types |
