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


Author Topic: CMD error  (Read 3763 times)

0 Members and 1 Guest are viewing this topic.

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
CMD error
« on: July 20, 2013, 11:54:48 AM »
So like i've been told. I've looked into lua scripting and it's going good so far, but all of a sudden when i use the "Luac -o ArcRace1.lur ScriptName.lua " code in cmd to compile, i get an error message that reads: "luarscript.lua:14: unexpected symbol near "-".
Any help would be great thanks. It was working like 10 minutes ago, now it just comes up with that.

-Josh

Offline WhenLifeGivesYouLemons

  • xfire: 1emonthatsme
  • Sr. Member
  • ***
  • Posts: 971
  • Gender: Male
  • 波動バースト
    • View Profile
Re: CMD error
« Reply #1 on: July 20, 2013, 12:06:08 PM »
Which means something is wrong around line 14 in your script. Look for any mistakes you made like missing " " or closing your codes with ( ). If you can find the problem directly post your script and we can try to fix it  :)

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: CMD error
« Reply #2 on: July 20, 2013, 12:21:47 PM »
Like Lemon said.
If u dont find the problem then post the script.

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #3 on: July 20, 2013, 12:24:34 PM »
Thanks guys, everyone is pretty supportive on here. Glad i joined, i'll be back on there soon so i'll be sure to post it if i don't figure out what i did. :D

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #4 on: July 20, 2013, 01:32:16 PM »
Right okay guys, this is just the basic script i got off SWEGTA and i added a few things to it:


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(700) -- gives the player 700 health
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
  DisablePunishmentSystem = TRUE
 
 TextPrintString("BodyGuard Mod Test", 4, 1) -

  Bif = PedCreateXYZ(33, l_1_0 +1, l_1_1 +1, l_1_2+1)
  PedRecruitAlly(gplayer, Bif)
  PedSetWeapon(Bif, 324,1) -
  Darby = PedCreateXYZ(37, l_1_0 +2, l_1_1 +2, l_1_2+2)
  PedRecruitAlly(Bif, Darby)
end
 
MissionCleanup = function()
end -- end statement
 
main = function() -- Main mission function
  repeat
    Wait(0)
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end


I removed the Text thing and now i get line 16 error with the bif weapon thing, can someone tell me how to spawn him with a sledgehammer?
« Last Edit: July 20, 2013, 01:36:15 PM by Go Hard »

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: CMD error
« Reply #5 on: July 20, 2013, 01:43:22 PM »
Right okay guys, this is just the basic script i got off SWEGTA and i added a few things to it:


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 Bif = nil
  local l_1_2 = 6.4000000953674 -- Z coords
 
  PlayerSetHealth(700) -- gives the player 700 health
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
  DisablePunishmentSystem(true)
 
 TextPrintString("BodyGuard Mod Test", 4, 1)

  Bif = PedCreateXYZ(33, l_1_0 +1, l_1_1 +1, l_1_2+1)
  PedRecruitAlly(gPlayer, Bif)
  PedSetWeapon(Bif, 324,1)
  Darby = PedCreateXYZ(37, l_1_0 +2, l_1_1 +2, l_1_2+2)
  PedRecruitAlly(Bif, Darby)
end
 
MissionCleanup = function()
end -- end statement
 
main = function() -- Main mission function
  repeat
    Wait(0)
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end


I removed the Text thing and now i get line 16 error with the bif weapon thing, can someone tell me how to spawn him with a sledgehammer?


^ Fixed.

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #6 on: July 20, 2013, 01:53:35 PM »
Thanks a lot man! works great.

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: CMD error
« Reply #7 on: July 20, 2013, 01:55:27 PM »
Shit, was AFK
lol I was gonna fix there.
Oh well, Red did the work, good job Red.

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #8 on: July 20, 2013, 05:00:01 PM »
Could anyone possibly tell me where i went wrong and why you changed the things you did? Sorry am a proper noob to this haha.

Offline WhenLifeGivesYouLemons

  • xfire: 1emonthatsme
  • Sr. Member
  • ***
  • Posts: 971
  • Gender: Male
  • 波動バースト
    • View Profile
Re: CMD error
« Reply #9 on: July 20, 2013, 05:38:36 PM »
Could anyone possibly tell me where i went wrong and why you changed the things you did? Sorry am a proper noob to this haha.
I am probably guessing line 14 was around this code..
DisablePunishmentSystem = TRUE

Red fixed the code to look like this
DisablePunishmentSystem(true)

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #10 on: July 20, 2013, 05:41:05 PM »
Oh okay, thanks. What about at the top? "local bif = nill"? Cheers again.

Offline WhenLifeGivesYouLemons

  • xfire: 1emonthatsme
  • Sr. Member
  • ***
  • Posts: 971
  • Gender: Male
  • 波動バースト
    • View Profile
Re: CMD error
« Reply #11 on: July 20, 2013, 05:45:35 PM »
Oh okay, thanks. What about at the top? "local bif = nill"? Cheers again.
nil with one L lol thats so the name Bif can be local in LUA

Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #12 on: July 20, 2013, 05:48:41 PM »
Lmao, thanks man.

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: CMD error
« Reply #13 on: July 20, 2013, 06:51:03 PM »
Where did you go wrong? I will write the parts in red (no pun intended).

Right okay guys, this is just the basic script i got off SWEGTA and i added a few things to it:


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(700) -- gives the player 700 health
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
  DisablePunishmentSystem = TRUE This should be DisablePunishmentSystem(true)
 
 TextPrintString("BodyGuard Mod Test", 4, 1) - Why is there a dash here? That's what caused the unexpected symbol message

  Bif = PedCreateXYZ(33, l_1_0 +1, l_1_1 +1, l_1_2+1) To be safe, always define a local meant for a character spawn as nil in the beginning of the script, as I did
  PedRecruitAlly(gplayer, Bif)
  PedSetWeapon(Bif, 324,1) - Again, why the dash?
  Darby = PedCreateXYZ(37, l_1_0 +2, l_1_1 +2, l_1_2+2)
  PedRecruitAlly(Bif, Darby)
end
 
MissionCleanup = function()
end -- end statement
 
main = function() -- Main mission function
  repeat
    Wait(0)
  until l_0_0 ~= false
  Wait(3000)
  MissionSucceed()
end


Offline Go Hard

  • Jr. Member
  • **
  • Posts: 4
  • Gender: Male
    • View Profile
Re: CMD error
« Reply #14 on: July 20, 2013, 06:58:36 PM »
Hahaha, random dashes FTW! Nahh:P thanks dude, helps a lot.