| 04-08-2006, 06:09 AM | #1 |
I don't understand why I'm getting this error in my Actions function for a trigger set off by Unit Starts the Effects of An Ability: Type-mismatch / Cannot convert player to unit JASS:function Trig_Equator_Shot_Actions takes nothing returns nothing //misc other variable declarations here local unit CastingUnit = GetSpellAbilityUnit() local unit CastingPlayer = GetOwningPlayer(CastingUnit) local unit TargetUnit = GetSpellTargetUnit() //trigger continues... JASS:local unit TargetUnit = GetSpellTargetUnit() Im thinking maybe it has something to do with the line before it, but I denno... EDIT: and/or something to do with the fact the Get...functions are constant natives? |
| 04-08-2006, 08:29 AM | #2 |
You are defining CastingPlayer as a unit by mistake. Should be: JASS:local player CastingPlayer = GetOwningPlayer(CastingUnit) |
| 04-08-2006, 08:31 AM | #3 | |
Quote:
Ah yes fun with compiling... You are correct your error is the line above-- you have CastingPlayer set to a unit not an player variable type.... GL HF |
| 04-08-2006, 03:26 PM | #4 |
Jesus what an obvious mistake. Heh, thanks for pointing it out, serves me right for staring at code for a game for the last 5 hours XD |
