[Solved]Script error:Missing line break before function call

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

[Solved]Script error:Missing line break before function call

Post by JustANewbie »

JassCraft shows this:

Line 8219:Missing line break before function call
Line 8219:Syntax error

World Editor shows this:
Spoiler:
function cu takes nothing returns boolean
return(udg_integers47[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]<=20)
endfunction

function Cu takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
set udg_integers47[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]=GetRandomInt(1,100)
if(cu())then
call GroupAddUnit(udg_group38,GetEventDamageSource())
set udg_real10=GetUnitFacing(GetEventDamageSource())
set udg_location46=jF(GetUnitLoc(GetEventDamageSource()),40.,udg_real10)
set udg_location47=jF(GetUnitLoc(GetEventDamageSource()),70.,udg_real10)
set udg_locations22[1]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
set udg_locations22[2]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
set udg_locations22[3]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
set udg_locations22[4]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[1],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[1],udg_real10)
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[2],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[2],udg_real10)
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[3],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[3],udg_real10)
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[4],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[4],udg_real10)
call CreateTextTagUnitBJ("|cffCFCFCFHræsvelgr!|r",GetEventDamageSource(),0,12.,100,100.,100.,0)call SetTextTagVelocityBJ(bj_lastCreatedTextTag,25.,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,2.)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,3.)
set udg_location43=GetUnitLoc(GetEventDamageSource())
set udg_location44=jF(GetUnitLoc(GetEventDamageSource()),300.,GetUnitFacing(GetEventDamageSource()))
set udg_real08=DistanceBetweenPoints(udg_location43,udg_location44)
set udg_real09=AngleBetweenPoints(udg_location43,udg_location44)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=R2I((udg_real08/50.))
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location45=jF(udg_location43,I2R((bj_forLoopAIndex*50)),udg_real09)
set udg_group25=tF(300.,udg_location45,Condition(function Nu))
call GroupAddGroup(udg_group25,udg_group26)
call RemoveLocation(udg_location45)
call DestroyGroup(udg_group25)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisableTrigger(udg_trigger28)
call ForGroupBJ(udg_group26,function bu)
if(Bu())then
set udg_reals13[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]=(udg_reals13[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]+18000.)
endif
call EnableTrigger(udg_trigger28)
call GroupClear(udg_group26)
call GroupRemoveUnit(udg_group38,GetEventDamageSource())
call RemoveLocation(udg_location43)
call RemoveLocation(udg_location44)
call RemoveLocation(udg_location46)
call RemoveLocation(udg_location47)
call RemoveLocation(udg_locations22[1])
call RemoveLocation(udg_locations22[2])
call RemoveLocation(udg_locations22[3])
call RemoveLocation(udg_locations22[4])
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
please help me to fix this error, thank you for helping
You do not have the required permissions to view the files attached to this post.
Last edited by JustANewbie on November 20th, 2012, 5:24 am, edited 1 time in total.
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: Script error:Missing line break before function call

Post by Apple »

JustANewbie wrote:JassCraft shows this:

Line 8219:Missing line break before function call
Line 8219:Syntax error

World Editor shows this:
Spoiler:
function cu takes nothing returns boolean
return(udg_integers47[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]<=20)
endfunction

function Cu takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
set udg_integers47[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]=GetRandomInt(1,100)
if(cu())then
call GroupAddUnit(udg_group38,GetEventDamageSource())
set udg_real10=GetUnitFacing(GetEventDamageSource())
set udg_location46=jF(GetUnitLoc(GetEventDamageSource()),40.,udg_real10)
set udg_location47=jF(GetUnitLoc(GetEventDamageSource()),70.,udg_real10)
set udg_locations22[1]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
set udg_locations22[2]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
set udg_locations22[3]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
set udg_locations22[4]=GetRandomLocInRect(RectFromCenterSizeBJ(udg_location47,300.,300.))
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[1],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[1],udg_real10)
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[2],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[2],udg_real10)
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[3],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[3],udg_real10)
call CreateNUnitsAtLoc(1,'h04A',GetOwningPlayer(GetEventDamageSource()),udg_locations22[4],udg_real10)
call CreateNUnitsAtLoc(1,'h04B',GetOwningPlayer(GetEventDamageSource()),udg_locations22[4],udg_real10)
call CreateTextTagUnitBJ("|cffCFCFCFHræsvelgr!|r",GetEventDamageSource(),0,12.,100,100.,100.,0)call SetTextTagVelocityBJ(bj_lastCreatedTextTag,25.,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,2.)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,3.)
set udg_location43=GetUnitLoc(GetEventDamageSource())
set udg_location44=jF(GetUnitLoc(GetEventDamageSource()),300.,GetUnitFacing(GetEventDamageSource()))
set udg_real08=DistanceBetweenPoints(udg_location43,udg_location44)
set udg_real09=AngleBetweenPoints(udg_location43,udg_location44)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=R2I((udg_real08/50.))
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location45=jF(udg_location43,I2R((bj_forLoopAIndex*50)),udg_real09)
set udg_group25=tF(300.,udg_location45,Condition(function Nu))
call GroupAddGroup(udg_group25,udg_group26)
call RemoveLocation(udg_location45)
call DestroyGroup(udg_group25)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisableTrigger(udg_trigger28)
call ForGroupBJ(udg_group26,function bu)
if(Bu())then
set udg_reals13[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]=(udg_reals13[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]+18000.)
endif
call EnableTrigger(udg_trigger28)
call GroupClear(udg_group26)
call GroupRemoveUnit(udg_group38,GetEventDamageSource())
call RemoveLocation(udg_location43)
call RemoveLocation(udg_location44)
call RemoveLocation(udg_location46)
call RemoveLocation(udg_location47)
call RemoveLocation(udg_locations22[1])
call RemoveLocation(udg_locations22[2])
call RemoveLocation(udg_locations22[3])
call RemoveLocation(udg_locations22[4])
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
please help me to fix this error, thank you for helping
Isn't linebreak |r ?
Never seen before this error.
Maybe it's world editor only error? Try using jasscraft + mpqeditor.
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: Script error:Missing line break before function call

Post by JustANewbie »

i tried jasscraft and world editor, but now yet mpqeditor, how to use it?

wohoo, i figured it out

call CreateTextTagUnitBJ("|cffCFCFCFHræsvelgr!|r",GetEventDamageSource(),0,12.,100,100.,100.,0)call SetTextTagVelocityBJ(bj_lastCreatedTextTag,25.,90)

should be

call CreateTextTagUnitBJ("|cffCFCFCFHræsvelgr!|r",GetEventDamageSource(),0,12.,100,100.,100.,0)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,25.,90)
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: Script error:Missing line break before function call

Post by Apple »

JustANewbie wrote:i tried jasscraft and world editor, but now yet mpqeditor, how to use it?
MpqEditor opens up the map,
Jasscraft opens up the war3map.j
looks like you figured it out :shock:
Oh well so thats the line break problem, we both learned something :lol:
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: Script error:Missing line break before function call

Post by JustANewbie »

ya ==