• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Jass Generated Vs Converted

Status
Not open for further replies.
Level 7
Joined
Feb 19, 2005
Messages
136
---- nevermind, found the problem, theirs a space i overlooked on that line!
Heres a lesson btw: Dont overlook spaces in JASS lol....

However i am faced with a new issue now -- i start a new map, make the trigger, put the working jass generated trigger in, and attempt to run it, it gives me "Expected a name" error on the lines for telling the peasants to patrol. I do make the regions & units before attempting that, so i kno the units are in place

i have this generator that does patrol movements automatically, btw the generator i made

however the generator code doesnt work, but when i make the same trigger in gui and convert, it says it works

Problem:
Line 34: Expected a name

Line 34 = set gg_trg_Patrol = Create Trigger( )

Heres Generated Code
JASS:
function Trig_Patrol_Actions takes nothing returns nothing
    call IssuePointOrderLocBJ( gg_unit_hpea_0000, "patrol", GetRectCenter(gg_rct_Region_000) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0001, "patrol", GetRectCenter(gg_rct_Region_001) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0002, "patrol", GetRectCenter(gg_rct_Region_001) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0003, "patrol", GetRectCenter(gg_rct_Region_003) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0004, "patrol", GetRectCenter(gg_rct_Region_004) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0005, "patrol", GetRectCenter(gg_rct_Region_005) )
endfunction

//===========================================================================
function InitTrig_Patrol takes nothing returns nothing
    set gg_trg_Patrol = Create Trigger(  )
    call TriggerAddAction( gg_trg_Patrol, function Trig_Patrol_Actions )
endfunction

Heres Converted Trigger
JASS:
function Trig_Patrol2_Actions takes nothing returns nothing
    call IssuePointOrderLocBJ( gg_unit_hpea_0000, "patrol", GetRectCenter(gg_rct_Region_000) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0001, "patrol", GetRectCenter(gg_rct_Region_001) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0002, "patrol", GetRectCenter(gg_rct_Region_002) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0003, "patrol", GetRectCenter(gg_rct_Region_003) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0004, "patrol", GetRectCenter(gg_rct_Region_004) )
    call IssuePointOrderLocBJ( gg_unit_hpea_0005, "patrol", GetRectCenter(gg_rct_Region_005) )
endfunction

//===========================================================================
function InitTrig_Patrol2 takes nothing returns nothing
    set gg_trg_Patrol2 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Patrol2, function Trig_Patrol2_Actions )
endfunction

any idea's on why my generated code doesnt work?
 
Last edited:
Level 7
Joined
Feb 19, 2005
Messages
136
read my edit diablo-dk ull see what i said and ull see why ur wrong

edit: faced with a new problem on this;

if i start a new map and the units are not "declared" .... i got the excepted a name error just like before but instead its on those lines with the hpea units [peasants]
 
Last edited:
Level 14
Joined
Nov 20, 2005
Messages
1,156
However i am faced with a new issue now -- i start a new map, make the trigger, put the working jass generated trigger in, and attempt to run it, it gives me "Expected a name" error on the lines for telling the peasants to patrol. I do make the regions & units before attempting that, so i kno the units are in place

Learn to read yourself? It says he had an error, he solved it, and then he had another error.
 
Status
Not open for further replies.
Top