Bully-Board
Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: Ky on February 19, 2015, 12:33:59 PM
-
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
l_0_0 = 60
MissionSetup = function()
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
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, l_1_0 +1, l_1_1 +1, l_1_2 +1)
PedRecruitAlly(gplayer, Johnny)
Hal = PedCreateXYZ(22, l_1_0 +2, l_1_1 +2, l_1_2 +2)
PedRecruitAlly(Johnny, Hal)
PlayerSetHealth(2000)
PedSetHealth(Johnny, 1500)
PedSetHealth(Hal, 1000)
end
F_MissionSetup = function()
LoadAnimationGroup("G_Johnny")
LoadActionTree("G_Striker_A")
LoadActionTree("G_Johnny")
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
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"
end
UpdateTextQueue()
Wait(0)
end
end
-
Dude that's my avatar -.-
-
Dude that's my avatar -.-
sorry, but help me please
-
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
l_0_0 = 60
MissionSetup = function()
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
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, l_1_0 +1, l_1_1 +1, l_1_2 +1)
PedRecruitAlly(gplayer, Johnny)
Hal = PedCreateXYZ(22, l_1_0 +2, l_1_1 +2, l_1_2 +2)
PedRecruitAlly(Johnny, Hal)
PlayerSetHealth(2000)
PedSetHealth(Johnny, 1500)
PedSetHealth(Hal, 1000)
end
F_MissionSetup = function()
LoadAnimationGroup("G_Johnny")
LoadActionTree("G_Striker_A")
LoadActionTree("G_Johnny")
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
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")
end
UpdateTextQueue()
Wait(0)
end
end
I fixed it.
You forgot a " ) "
-
The same error is happening, no code works :(
-
I've tried various codes, but always of the same error
-
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
local l_0_0 = 60
local gMissionRunning = true
MissionSetup = function()
LoadAnimationGroup("G_Johnny")
LoadActionTree("G_Striker_A")
LoadActionTree("G_Johnny")
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
PlayerSetControl(1)
CameraFollowPed(gPlayer)
ClockSet(8, 30)
ClockSetTickRate(0.0060000000521541)
LaunchScript("SObjTest.lua")
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, l_1_0 +1, l_1_1 +1, l_1_2 +1)
PedRecruitAlly(gplayer, Johnny)
Hal = PedCreateXYZ(22, l_1_0 +2, l_1_1 +2, l_1_2 +2)
PedRecruitAlly(Johnny, Hal)
PlayerSetHealth(2000)
PedSetHealth(Johnny, 1500)
PedSetHealth(Hal, 1000)
end
MissionCleanup = function()
ClearTextQueue()
EnablePOI()
gMissionRunning = false
shared.gMissionEventFunction = nil
WeatherRelease()
PlayerSetControl(1)
PlayerSetPunishmentPoints(0)
end
main = function()
if gMissionRunning == true then
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")
end
UpdateTextQueue()
Wait(0)
end
end
You forgot to declare 1_0_0 a local. I think it should work now... hehe...
You also have multiple mission setup, so I did some minor adjustments to your script.
-
Does not work I'm still desperate
-
This error appears in all codes, even in codes that I was compiling perfect before
-
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.
-
still the same error
-
I've tried with various codes and always the same error, what should it be?
-
Something is wrong with your lua editor or compiler or visual studio then.
It worked for me perfectly, and I used notepad++ to write the code, LuaC by Fred Tetra/MadmaN to compile, and installed the Visual Studio version supplied with MadmaN's LuaC release.
-
Something is wrong with your lua editor or compiler or visual studio then.
It worked for me perfectly, and I used notepad++ to write the code, LuaC by Fred Tetra/MadmaN to compile, and installed the Visual Studio version supplied with MadmaN's LuaC release.
what I can do ? could send me the link of all I need, I try to uninstall and reinstall
-
Notepad++ (http://notepad-plus-plus.org/download/v6.7.4.html): You'll use this to write your LUA code.
LuaC (http://www.bully-board.com/index.php?action=downloads;sa=view;down=60): You'll use this to compile the LUA code. Read all the ReadMe.txts and install what it says.
IMG Toolkit V1 (http://www.bully-board.com/index.php?action=downloads;sa=view;down=159): You can use this to put your compiled LUR files into the Scripts.img. Make sure to delete the old LUR file of the one you're replacing first.
-
already uninstalled and installed again and nothing, the same error occurs
-
The same error is happening, no code works :(
Mine compiled it.
-
it was like DABoss said something wrong is going on, what will be be?
-
I guess I'll never learn modding Bully :(
-
You can try compiling in a different directory or create a new .lua file, copy and paste all the code from your original script, and then name it something different. This might help you since the script itself is not the problem.
-
You're compiling THIS script right? Not another one that contains the error?
Give us the line you put in command prompt, or screenshot it also with the folder the script file is in open so we can see that you gave LuaC proper arguments and the file is in a good place.
-
here goes a print
-
You can try compiling in a different directory or create a new .lua file, copy and paste all the code from your original script, and then name it something different. This might help you since the script itself is not the problem.
How can I do this?
-
^^ man you dont've a copy of ArcRace1.lur in your LUA folder. check it out
-
^^ man you dont've copy of ArcRace1.lur in your LUA folder. check it out
yes
-
LuaC makes a new ArcRace1.lur when it successfully compiles.
-
:(
-
Try to download this file, drag over your C:/LUA, and replace the old luascript.lua. http://www.filedropper.com/luascript (http://www.filedropper.com/luascript)
If this doesn't work, I really have no idea what to do.
-
Try to download this file, drag over your C:/LUA, and replace the old luascript.lua. http://www.filedropper.com/luascript (http://www.filedropper.com/luascript)
If this doesn't work, I really have no idea what to do.
It worked :) thank you, tell me what the problem was?
-
The code I gave you there is the exact same as the code I gave before in a code box in a previous post. I just put it in a lua file and saved it. Something is wrong with your LUA editor (Notepad++, and if that's not what you used to make the code, that may be the problem)
-
The code I gave you there is the exact same as the code I gave before in a code box in a previous post. I just put it in a lua file and saved it. Something is wrong with your LUA editor (Notepad++, and if that's not what you used to make the code, that may be the problem)
I use Notepad++