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 » Scripting Helpers
Home Search
 

Re: Diaglog shop script

Previous Thread :: Next Thread 
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
07 Sep 2011 12:25 PM
sword = game.Lighting.SparklySword

script.Parent.DialogChoiceSelected:connect(function(shop)
if game.workspace.leaderstats:FindFirstChild().Gold.Value = <=200
then sword:Clone()
Clone.Parent = Players:FindFirstChild().Starterpack
end
end)


the output says it expects a then near '=' on line 4
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
07 Sep 2011 12:29 PM
nvm, i checked roblox wiki and i know whats wrong
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
07 Sep 2011 12:38 PM
iv'e edited it to this

sword = game.Lighting.SparklySword
cash = game.Players:FindFirstChild().leaderstats.Gold.value

script.Parent.DialogChoiceSelected:connect(function(shop)
if cash <= script.Parent.Cost.Value
then cash.Value = cash.value - 200
sword:Clone()
Clone.Parent = Players:FindFirstChild().Starterpack
end
end)


and now the dialog simply says 'missing argument'
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Sep 2011 12:39 PM
you need a then after the argument on the first if line.
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
07 Sep 2011 12:40 PM
oh...
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Sep 2011 12:41 PM
its alright, we always make mistakes every now and then :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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