News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: luascript.lua:101: 'end' expected <to close 'while' at line 100  (Read 2044 times)

0 Members and 1 Guest are viewing this topic.

Offline Ky

  • Full Member
  • ***
  • Posts: 329
  • Gender: Male
  • <3
    • View Profile
luascript.lua:101: 'end' expected <to close 'while' at line 100
« on: February 22, 2015, 01:21:10 PM »
Code: [Select]
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")

  l_0_0 = 60
 
MissionSetup = function()
  local l_1_0 = 270
  local l_1_1 = -110
  local l_1_2 = 6.4000000953674
 
  PlayerSetHealth(200)
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
 
end
 
F_MissionSetup = function()

  LoadAnimationGroup("Authority")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("Grap")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("LE_Orderly")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("PunchBag")
  LoadAnimationGroup("Qped")
  LoadAnimationGroup("Rat_Ped")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_Pbomb")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("TE_Female")

 
  PlayerSetControl(1)
 
  CameraFollowPed(gPlayer)
 
  ClockSet(8, 30)
 
  ClockSetTickRate(0.0060000000521541)
 
  LaunchScript("SObjTest.lua")

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
  elseif IsButtonPressed(15,0) then
  PedSetActionTree(gPlayer, "/Global/G_Striker_A", "Act/Anim/G_Striker_A.act")
  elseif IsButtonPressed(3,0) then
  PedSetActionNode(gPlayer, "/Global/G_Striker_A/Offense/GroundAttack/GroundPunch", "Act/Anim/G_Striker_A.act")
  elseif IsButtonPressed(6,0) and IsButtonPressed(9,0) then
  PedSetActionNode(gPlayer, "/Global/G_Striker_A/Offense/Short/Strikes/HeavyAttacks/HeavyKnee", "act/anim/G_Striker_A.act")
  elseif IsButtonPressed(0,0) then
  PedSetActionNode(gPlayer, "/Global/G_Johnny/Offense/Special/SpecialActions/Grapples/Dash/ThroatGrab", "act/anim/G_Johnny.act")
  end
  UpdateTextQueue()
    Wait(0)
   end

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
Re: luascript.lua:101: 'end' expected <to close 'while' at line 100
« Reply #1 on: February 22, 2015, 01:38:11 PM »
Change:

Code: [Select]
  elseif IsButtonPressed(15,0) then
To:

Code: [Select]
if IsButtonPressed(15,0) then

Offline boyser

  • Wazzzuuupppp
  • Full Member
  • ***
  • Posts: 176
  • Gender: Male
  • THE REAL G IS ME
    • View Profile
Re: luascript.lua:101: 'end' expected <to close 'while' at line 100
« Reply #2 on: February 22, 2015, 03:18:41 PM »
http://pastebin.com/STaCXgw1 

i fixed it for you