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


Author Topic: Help!!  (Read 7323 times)

0 Members and 3 Guests are viewing this topic.

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Help!!
« on: July 01, 2013, 03:18:36 AM »
Why this not work??
Code: [Select]
ImportScript("\\Library\\LibTable.lua") -- imports the LibTable library
ImportScript("\\Library\\LibPed.lua") -- imports the LibPed library
local l_0_0 = false
 
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
  local l_1_0 = 270 -- X coords
  local l_1_1 = -110 -- Y coords
  local l_1_2 = 6.4000000953674 -- Z coords

  PlayerSetHealth(50000) -- gives the player 50000 health
  AreaTransitionXYZ(0,l_1_0,l_1_1,l_1_2)
  ifIsButtonPressed(0,0) then
  ---code of weather----
  elseifIsButtonPressed(1,0) then
  ---code of weather---
  (0,0)= left arrow
  (1,0)= right arrow
  (14,0)= X
  (15,0)= C
end
 
MissionCleanup = function()
end -- end statement
 
main = function() -- Main mission function
  repeat
    Wait(0)
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end


When i compiling that,that not work....
can help me??

Offline c00ld0c26

  • The D0c
  • Moderator
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Help!!
« Reply #1 on: July 01, 2013, 03:28:27 AM »
Does it let you compile? or when u try to use it, bully crashes?

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #2 on: July 01, 2013, 03:33:35 AM »
no, when I compile the lua
in cmd says: unexpected symbol near "then"
as was said cmd .....
@ c00ld0c26 can you fix my lua??

Offline c00ld0c26

  • The D0c
  • Moderator
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Help!!
« Reply #3 on: July 01, 2013, 03:34:36 AM »
I think I can fix it, but I need you to tell me in which line it happends, it will write u the line's number, then I will be able to detect the problem.

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #4 on: July 01, 2013, 03:39:16 AM »
I think I can fix it, but I need you to tell me in which line it happends, it will write u the line's number, then I will be able to detect the problem.

IN Weather,or in then....
that problem...

Offline c00ld0c26

  • The D0c
  • Moderator
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Help!!
« Reply #5 on: July 01, 2013, 03:42:04 AM »
I need the line.
 luac: Test.lua:23:
I marked where it will say the line with Red, tell me which line is the problem

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #6 on: July 01, 2013, 03:44:53 AM »
I need the line.
 luac: Test.lua:23:
I marked where it will say the line with Red, tell me which line is the problem


ok ...
luac: Weather.lua:12:

Offline c00ld0c26

  • The D0c
  • Moderator
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Help!!
« Reply #7 on: July 01, 2013, 04:01:59 AM »
Was gonna answer on that, but you beat me :D

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #8 on: July 01, 2013, 04:03:06 AM »
Oh and my friend i saw the problem right here too.
--code of weather-- here is where the code of weather should be write here are the codes
weather (1)
weather (2)
weather (3)
weather (4)
weather (6)


yeah ok thanks,but in cmd says symbol near "then"
what that??


Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #9 on: July 01, 2013, 04:07:47 AM »
Oh and my friend i saw the problem right here too.
--code of weather-- here is where the code of weather should be write here are the codes
weather (1)
weather (2)
weather (3)
weather (4)
weather (6)


yeah ok thanks,but in cmd says symbol near "then"
what that??
Make it like this
--ifIsButtonPressed(0,0)
plus those button and weather codes must be write under main fuction

you mean like this ,friend??
Code: [Select]
ImportScript("\\Library\\LibTable.lua") -- imports the LibTable library
ImportScript("\\Library\\LibPed.lua") -- imports the LibPed library
local l_0_0 = false
 
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
  local l_1_0 = 270 -- X coords
  local l_1_1 = -110 -- Y coords
  local l_1_2 = 6.4000000953674 -- Z coords

  PlayerSetHealth(50000) -- gives the player 50000 health
  AreaTransitionXYZ(0,l_1_0,l_1_1,l_1_2)
  ifIsButtonPressed(0,0)
  ---code of weather----
  weather (1)
  weather (2)
  weather (3)
  weather (4)
  weather (6)
  elseifIsButtonPressed(1,0)
  ---code of weather---
  (0,0)= left arrow
  (1,0)= right arrow
  --(14,0)= X
  --(15,0)= C
end
 
MissionCleanup = function()
end -- end statement
 
main = function() -- Main mission function
  repeat
    Wait(0)
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end



Offline SWEGTA

  • Da Forum Luffs Me!
  • *****
  • Posts: 6,422
  • Gender: Male
  • Swee Gee Tee Ayy
    • View Profile
    • Bully & GTA videos
Re: Help!!
« Reply #10 on: July 01, 2013, 04:51:56 AM »
Here, I fixed it.
You can compile it, but I have no idea what you wanted from it.
Have a look through and do whatever you feel like.

I just made it compileable and it works for me.  :euro:

Code: [Select]
ImportScript("\\Library\\LibTable.lua")
ImportScript("\\Library\\LibPed.lua")
local l_0_0 = false
 
MissionSetup = function()
  local l_1_0 = 270
  local l_1_1 = -110
  local l_1_2 = 6.4000000953674
  PlayerSetHealth(50000)
  AreaTransitionXYZ(0,l_1_0,l_1_1,l_1_2)
end
 
 
---------------------
-- Weather codes:
  -- WeatherSet(0)
  -- WeatherSet(1)
  -- WeatherSet(2)
  -- WeatherSet(3)
  -- WeatherSet(4)
  -- WeatherSet(5)
  -- WeatherSet(6)
---------------------

 
MissionCleanup = function()
end
 
ButtonDetect = function() -- Sets up Button detection function
  if IsButtonPressed(0,0) then
-- SOMETHING HAPPENS

  elseif IsButtonPressed(1,0) then
-- SOMETHING HAPPENS
  end
end
 
main = function()
  repeat
    Wait(0)
ButtonDetect() -- Uses Button detection function
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #11 on: July 01, 2013, 05:02:11 AM »
Here, I fixed it.
You can compile it, but I have no idea what you wanted from it.
Have a look through and do whatever you feel like.

I just made it compileable and it works for me.  :euro:

Code: [Select]
ImportScript("\\Library\\LibTable.lua")
ImportScript("\\Library\\LibPed.lua")
local l_0_0 = false
 
MissionSetup = function()
  local l_1_0 = 270
  local l_1_1 = -110
  local l_1_2 = 6.4000000953674
  PlayerSetHealth(50000)
  AreaTransitionXYZ(0,l_1_0,l_1_1,l_1_2)
end
 
 
---------------------
-- Weather codes:
  -- WeatherSet(0)
  -- WeatherSet(1)
  -- WeatherSet(2)
  -- WeatherSet(3)
  -- WeatherSet(4)
  -- WeatherSet(5)
  -- WeatherSet(6)
---------------------

 
MissionCleanup = function()
end
 
ButtonDetect = function() -- Sets up Button detection function
  if IsButtonPressed(0,0) then
-- SOMETHING HAPPENS

  elseif IsButtonPressed(1,0) then
-- SOMETHING HAPPENS
  end
end
 
main = function()
  repeat
    Wait(0)
ButtonDetect() -- Uses Button detection function
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end




thanks.... :D :D ;D ;D

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #12 on: July 01, 2013, 05:19:12 AM »
But,hey
why nothing change...???
why weather not change???

Offline SWEGTA

  • Da Forum Luffs Me!
  • *****
  • Posts: 6,422
  • Gender: Male
  • Swee Gee Tee Ayy
    • View Profile
    • Bully & GTA videos
Re: Help!!
« Reply #13 on: July 01, 2013, 08:07:10 AM »
But,hey
why nothing change...???
why weather not change???

Because I told you, you have to make changes to it.
I just fixed it.

Offline DarbyHarringtonMind

  • XX
  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • Move forward, Don't look back........
    • View Profile
Re: Help!!
« Reply #14 on: July 01, 2013, 12:16:16 PM »
But,hey
why nothing change...???
why weather not change???
Here
ifIsButtonPressed(0,0) then -- SOMETHING HAPPENS
WeatherSet(1)
elseifIsButtonPressed(1,0) then--SOMETHING HAPPENS
WeatherSet(2)



Thankss..... :D :D