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: Argument 1 missing or nil?

Previous Thread :: Next Thread 
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
18 Jan 2012 08:42 PM
Output:
21:41:42 - Argument 1 missing or nil
21:41:42 - Script "Players.Player.PlayerGui.Menu.FrameShop.ShopScript", Line 18

Script:
if Money.Value ​>= Prices[Num] then
v.Text = "Buy Now"
elseif Player.StarterGear:FindFirstChild(TxtNames[i]) ~= nil then <----------18!
v.Text = "Allready Owned!"
else
v.Text = "Need "..Prices[Num] - Money.Value.." more!"
end
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
18 Jan 2012 08:46 PM
We need the lines before that. the 'for' loop line.
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
18 Jan 2012 08:49 PM
elseif (Player.StarterGear:FindFirstChild(TxtNames[i]) ~= nil) then


That should work.

Free Fireworks!
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
18 Jan 2012 08:50 PM
It says theres a bad word in my script.

I made a model of it:
http://www.roblox.com/Script-item?id=70389680
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
18 Jan 2012 08:52 PM
@DX Nope. Theres a couple of errors now.
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
18 Jan 2012 08:53 PM
The for?

v.MouseEnter:connect(function()
for i = 1,#TxtNames do
if v.Name == Names[i] then
Num = i
end
end
if Money.Value ​>= Prices[Num] then
v.Text = "Buy Now"
elseif (Player.StarterGear:FindFirstChild(TxtNames[i]) ~= nil) then
v.Text = "Allready Owned!"
else
v.Text = "Need "..Prices[Num] - Money.Value.." more!"
end
end)
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
19 Jan 2012 05:10 AM
Help?
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
19 Jan 2012 06:26 AM
.MouseEnter? I don't think I have ever heard of that event. What do that event wait for?
Also, I don't think you defined "v".

Vote against SOPA! If we don't, then Ever ████ Will be Censored! So, let ████ vote ████ SOPA! [Free Fire ████!]
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
19 Jan 2012 01:43 PM
Yes i have defined v.

My first two lines are
for i,v in pairs(script.Parent:GetChildren()) do
if v:IsA("TextButton") then


Everything works but the last item on the list.

Also look in functions

MouseEnter is a function.
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
19 Jan 2012 01:54 PM
Got it, it had to be:
TxtNames[Num] not TxtNames[i]

@DX Here's a tip. Don't waste people's time if you don't know what you're talking about.
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