| 03-06-2007, 06:05 AM | #1 |
ok well I need to get the string to say "has been killed for an additional (x amount) of gold this is what i tried but it doesn't work... please help im still learning. JASS:constant function AssistanceSystem_DeathMessage takes nothing returns string return "has been killed for an additional " + ( ( GetHeroLevel(GetDyingUnit()) * 5 ) + 100 ) + " gold " endfunction |
| 03-06-2007, 06:56 AM | #2 |
you are using an integer in the string, meaning you will have to convert it by using I2S(GetHeroLevel bla bla bla...) |
| 03-06-2007, 08:12 AM | #3 |
Yes, hes right, use this instead: JASS:constant function AssistanceSystem_DeathMessage takes nothing returns string return "has been killed for an additional " + I2S(GetHeroLevel(GetDyingUnit())*5+100)+" gold " endfunction You had some pointless brackets in there, * is calculated before +. So its the same without the brackets. |
| 03-06-2007, 10:27 AM | #4 |
JASS:constant function AssistanceSystem_DeathMessage takes nothing returns string return "was taken to school for an additional " + I2S(GetHeroLevel(GetDyingUnit())*5+100)+" gold " endfunction |
