I took out unnecessary code, and also fixed a few things. I compiled it successfully and could load the script successfully, I had 2 allies recruited and music was playing.
I added a comment to everything I changed.
-- Removed unnecessary imported scripts, you do not need them.
-- Removed l_0_0 = 60 because you never use it in the script
MissionSetup = function()
-- Changed names of variables to something that makes more sense. X makes more sense than l_1_0
local X = 270
local Y = -110
local Z = 6.4
AreaTransitionXYZ(0, X, Y, Z)
PedSetTypeToTypeAttitude(1, 13, 2)
PedSetTypeToTypeAttitude(2, 13, 2)
PedSetTypeToTypeAttitude(3, 13, 1)
PedSetTypeToTypeAttitude(4, 13, 4)
PedSetTypeToTypeAttitude(5, 13, 1)
PedSetTypeToTypeAttitude(6, 13, 2)
PedSetTypeToTypeAttitude(11, 13, 2)
SoundPlayStream("MS_FightingJohnnyVincentBossFight.rsm", 0.69999998807907)
Johnny = PedCreateXYZ(23, X +1, Y +1, Z +1)
PedRecruitAlly(gPlayer, Johnny) -- Capitalized gPlayer. You had "gplayer"
Hal = PedCreateXYZ(22, X +2, Y +2, Z +2)
PedRecruitAlly(Johnny, Hal)
PlayerSetHealth(2000)
PedSetHealth(Johnny, 1500)
PedSetHealth(Hal, 1000)
end
F_MissionSetup = function()
LoadAnimationGroup("G_Johnny")
LoadActionTree("Act/Anim/G_Striker_A.act") -- Specified full directory of act file. You only had "G_Striker_A"
LoadActionTree("Act/Anim/G_Johnny.act") -- Specified full directory of act file. You only had "G_Johnny"
PlayerSetControl(1)
CameraFollowPed(gPlayer)
ClockSet(8, 30)
ClockSetTickRate(0.0060000000521541)
-- Removed LaunchScript("SObjTest.lua") because there is no reason you need to launch another script for this mod
end
MissionCleanup = function()
ClearTextQueue()
EnablePOI()
gMissionRunning = false
shared.gMissionEventFunction = nil
WeatherRelease()
PlayerSetControl(1)
PlayerSetPunishmentPoints(0)
end
main = function()
F_MissionSetup()
gMissionRunning = true
while gMissionRunning do
if IsButtonPressed(2,0) then
PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny.act")
elseif IsButtonPressed(0,0) then
PedSetActionTree(gPlayer, "/Global/G_Johnny", "Act/Anim/G_Johnny.act")
elseif IsButtonPressed(15,0) then
PedSetActionTree(gPlayer, "/Global/G_Striker_A", "Act/Anim/G_Striker_A.act")
elseif IsButtonPressed(1,0) and IsButtonPressed(9,0) then
PedSetActionNode(gPlayer, "/Global/G_Johnny/Offense/Short/Strikes/LightAttacks/Punch_1/Punch_2/Punch_3/ShortJohnny", "act/anim/G_Johnny.act") -- Added a ')' on the end. You forgot it.
end
UpdateTextQueue()
Wait(0)
end
end
I used notepad++ to write the code, LuaC by Fred Tetra/MadmaN to compile, and MadmaN's IMG Toolkit V1 to add/replace in the Scripts.img.