Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

attempt to perform arithmetic on global 'cbtcur1' (a table value) help?

Asked by 9 years ago

Title explains it all. I do not know how to solve the problem and the Roblox Forums didn't help, so here I am. Please help, because I need this ready for a friend by tomorrow.

cob=math.floor((#cbtcur1+#cbtcur2)/2)
    for i=1,cob do
        cb1=Instance.new("Part",SupportSeg)
        cb1.Name="CB1"
        if cbtcur1[i]<0 and cbtprev1[i]<0 then
        cb1.Size=Vector3.new(cbtcur1[i]-cbtprev1[i],.6,.6)
        cb1.Position=Vector3.new(cbtcur1-cbtprev1,cbtcury,cbtcurz)
        elseif cbtcur1[i]<0 and cbtprev1[i]<0 then
        cb1.Size=Vector3.new(cbtcur1[i]-cbtprev1[i],.6,.6)
        cb1.Position=Vector3.new(cbtcur1-cbtprev1,cbtcury,cbtcurz)
        else
        cb1.Size=Vector3.new(cbtcur1[i]+cbtprev1[i],.6,.6)
        cb1.Position=Vector3.new(cbtcur1+cbtprev1,cbtcury,cbtcurz)
        end
0
So, you want us to do the script that your friend wants you to make? Tell your friend to ask Scriptinghelpers.org, it's free. Vezious 310 — 9y
0
That was just a very partial part of the code by the way. TealTeam 40 — 9y
0
I'm making this for me AND him actually. This is the absolute last thing I need to fix in the script before it's finished. TealTeam 40 — 9y
0
Any help please? TealTeam 40 — 9y
View all comments (2 more)
0
attempt to perform arithmetic means your trying to convert the value to a number. this error will show if the value is A) not a number or B) if you try to convert a string that is not only numbers lukeb50 631 — 9y
0
Are the tables filled with number values? Azmidium 388 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

You missed a few [i]s on line 7, 10, and 13.

Ad

Answer this question