generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: my script isn't working

Previous Thread :: Next Thread 
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
20 Feb 2017 12:35 PM
I'm trying to use a do-not-block, however it's erroring.

do not
print("taco")
end

Error in script: unexpected symbol near 'not'
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
20 Feb 2017 12:36 PM
what
why would you

why

Report Abuse
sircfenner is not online. sircfenner
Joined: 29 Aug 2008
Total Posts: 2430
20 Feb 2017 12:36 PM
Nice username. What exactly were you intending that ### of code to do?
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
20 Feb 2017 12:41 PM
A do-not-block is suppose to have all the scope of a do-block, however not execute any of it.

I had a big script with a lot more variables, but it wasn't working so I'm testing it with a print function.

Ideally, it's suppose to not print taco. But it's also not suppose to error.
Report Abuse
C00lKid185 is not online. C00lKid185
Joined: 12 Nov 2016
Total Posts: 32
20 Feb 2017 12:41 PM
while wait() do
if not workspace:FindFirstChild("Part") then
print("taco")
end
end


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
20 Feb 2017 12:42 PM
you can't negate a call to a function like that with ### 'not' operator what's wrong with commenting it out if you ##### #### ## to run?
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
20 Feb 2017 12:42 PM
you can't negate a call to a function like that with 'not' operator
what's wrong with commenting it out if you don't want it to run?


Report Abuse
sircfenner is not online. sircfenner
Joined: 29 Aug 2008
Total Posts: 2430
20 Feb 2017 12:42 PM
This so-called "do-not-block" is not a feature of Lua.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
20 Feb 2017 12:43 PM
It's not negating it, it's just a standard do-not-block.

I'm trying to figure out why it's throwing that error.
Report Abuse
sircfenner is not online. sircfenner
Joined: 29 Aug 2008
Total Posts: 2430
20 Feb 2017 12:44 PM
Please read the above posts, esp. the one from Unsubtleties.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
20 Feb 2017 12:45 PM
well I meant more like neutralizing it/canceling it out
and yeah "do not" blocks don't work in lua


Report Abuse
DragonHorse25 is not online. DragonHorse25
Joined: 07 Dec 2014
Total Posts: 54
20 Feb 2017 12:55 PM
Thats not a feature of LUA that I know of, but you can do this.

do = false
if do then
print("Done")
end
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
20 Feb 2017 12:58 PM
Alright. I've figured out a workaround, however for another part of my script I need to utilize a do-maybe block.

Any assistance?
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
20 Feb 2017 12:58 PM
explain what "do-maybe" means first lol


Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
20 Feb 2017 01:00 PM
A standard do-maybe block gives a 50-50 chance of running.

Completely built into Lua as far as I'm aware.

do maybe
print("tacos")
end
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
20 Feb 2017 01:02 PM
if math.random(2) == 1 then
...
end


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image