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: Attempt to perform arithmetic on global i

Previous Thread :: Next Thread 
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 08:52 PM

user.PlayerGui.Health.Size = UDim2.new((i/100), 0, 1,0)

Workspace.Computer.Part.Script:16: attempt to perform arithmetic on global 'i' (a nil value)

--earlier in the script both of these work so im not sure what to do differently
user.PlayerGui.Hacking.MainFrame.CaptureTiem.Health.Size = UDim2.new(((100-(Workspace.data.Time2CaptureSmallpipes.Value))/100), 0, 1,0)
user.PlayerGui.Hacking.MainFrame.CaptureTiem.Percent.Text = tostring(100-(Workspace.data.Time2CaptureSmallpipes.Value)).."% Done"
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
19 Nov 2012 08:54 PM
You haven't defined i.
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
19 Nov 2012 08:55 PM
i isn't defined.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
19 Nov 2012 08:58 PM
Also, I'm not sure if this is a typo or not, but you said CaptureTiem instead of CaptureTime.
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 09:11 PM
This is a bigger section of the script
for i=1, 100 do
if check.Health > 0 then
Workspace.data.Time2CaptureSmallpipes.Value = 100 - i
wait(1)
user.PlayerGui.Hacking.MainFrame.CaptureTiem.Health.Size = UDim2.new(((i)/100), 0, 1,0)
user.PlayerGui.Hacking.MainFrame.CaptureTiem.Percent.Text = tostring(i).."% Done"
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 09:11 PM
it isn't a typo, thanks though
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 09:16 PM
Anyhelp?
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
19 Nov 2012 09:29 PM
try this?

for i=1, 100 do
if check.Health > 0 then
Workspace.data.Time2CaptureSmallpipes.Value = 100 - i
wait(1)
user.PlayerGui.Hacking.MainFrame.CaptureTiem.Health.Size = UDim2.new((tonumber(i)/100), 0, 1,0)
user.PlayerGui.Hacking.MainFrame.CaptureTiem.Percent.Text = tostring(i).."% Done"
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 10:01 PM
Nope, that gives the same error.
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
19 Nov 2012 10:05 PM
Why would you be scripting things to start with? You have no active places.
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 10:12 PM
Why would you even be writing here to start with? You have no books written.
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 10:46 PM
bump
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
19 Nov 2012 11:11 PM
bump
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
20 Nov 2012 12:08 AM
I can predict the next 5 posts:
"Bump!"
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
20 Nov 2012 12:16 AM
Bump!
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
20 Nov 2012 12:16 AM
Guys I found the problem, stop bumping.
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