- Joined
- Dec 13, 2018
- Messages
- 2,314
Is there any limit to how many characters I can have in a custom script? When I try to save a map with the following I get a compile error saying syntax error, unexpected end of line.
If I change [MI_Count] to a number (example [1]) instead it compiles without errors....
-
MIL
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Inner Fire
-
Actions
- Set MI_Count = (MI_Count + 1)
- Set MI_Caster[MI_Count] = (Triggering unit)
- Set MI_Target[MI_Count] = (Target unit of ability being cast)
- Set MIL_Point1[MI_Count] = (Position of MI_Caster[MI_Count])
- Set MIL_Point2[MI_Count] = (Position of MI_Target[MI_Count])
- Custom script: set udg_MIL[MI_Count] = AddLightningEx("DRAL", true , GetLocationX(udg_MIL_Point1[MI_Count]), GetLocationY(udg_MIL_Point1[MI_Count]), GetLocationZ(udg_MIL_Point1[MI_Count]) + 70, GetLocationX(udg_MIL_Point2[MI_Count]), GetLocationY(udg_MIL_Point2[MI_Count]), GetLocationZ(udg_MIL_Point2[MI_Count]) + 70)
- Custom script: call RemoveLocation (udg_MIL_Point1[1])
- Custom script: call RemoveLocation (udg_MIL_Point2[1])
- Wait 10.00 seconds
- Set MI_Total = (MI_Total + 1)
- Lightning - Destroy MIL[MI_Total]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MI_Count Equal to MI_Total
-
Then - Actions
- Set MI_Count = 0
- Set MI_Total = 0
- Else - Actions
-
If - Conditions
-
Events
-
MIL Periodic
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set MIL_Point1[MI_Count] = (Position of MI_Caster[MI_Count])
- Set MIL_Point2[MI_Count] = (Position of MI_Target[MI_Count])
- Custom script: call MoveLightningEx(udg_MIL[MI_Count], true , GetLocationX(udg_MIL_Point1[MI_Count]), GetLocationY(udg_MIL_Point1[MI_Count]), GetLocationZ(udg_MIL_Point1[MI_Count]) + 70, GetLocationX(udg_MIL_Point2[MI_Count]), GetLocationY(udg_MIL_Point2[MI_Count]), GetLocationZ(udg_MIL_Point2[MI_Count]) + 70)
- Custom script: call RemoveLocation (udg_MIL_Point1[1])
- Custom script: call RemoveLocation (udg_MIL_Point2[1])
-
Events
If I change [MI_Count] to a number (example [1]) instead it compiles without errors....
Last edited: