Now it quite obviously has to do with the AddUnitClass line in the lua, I had added one for bastila.Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #1 to `AddUnitClass' (number expected, got nil)
stack traceback:
[C]: in function `AddUnitClass'
(none): in function `ScriptInit'
But it worked fine on the first test, and now this.
heres the signifigant part of the lua.
Bastila is the kor_knight_bast
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_macewindu",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")
ReadDataFile("dc:SIDE\\kor.lvl",
"kor_knight_02",
"kor_inf_yoda",
"kor_inf_wookie",
"kor_inf_Revan",
"kor_inf_mission",
"kor_inf_Malak",
"kor_hero_carthonasi",
"kor_hero_sithmask",
"kor_hero_uthar",
"kor_hero_yuthura",
"kor_knight_bast")
ReadDataFile("dc:SIDE\\orep.lvl",
"orep_knight_09",
"orep_knight_03")
ReadDataFile("dc:SIDE\\sith.lvl",
"sith_inf_Sithap")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi")
ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")
ReadDataFile("dc:SIDE\\man.lvl",
"man_inf_mand1",
"man_inf_mand2",
"man_duros_noob",
"man_inf_mand3")
ReadDataFile("SIDE\\cis.lvl",
"cis_hero_countdooku")
--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]
--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")
SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "kor_knight_02",1,2},
assault = { "orep_knight_09", 1,2},
engineer= { "orep_knight_03", 1,2},
sniper = { "kor_inf_yoda", 1,2},
officer = { "kor_inf_mission", 1,2},
special = { "kor_hero_carthonasi", 1,2},
},
}
AddUnitClass(all, "kor_knight_bast",1,2)
SetupTeams{
villain = {
team = IMP,
units = 12,
reinforcements = -1,
soldier = { "kor_inf_Revan", 1,2},
assault = { "kor_inf_Malak",1,2},
engineer= { "kor_inf_wookie", 1,2},
sniper = { "sith_inf_Sithap", 1,2},
officer = { "kor_hero_uthar", 1,2},
special = { "kor_hero_yuthura", 1,2},
},
}
AddUnitClass(IMP, "kor_hero_sithmask",1,2)


