Jump to content

Array variable error. Doesn't appear to match other similar issues in the forums.


Go to solution Solved by Subz,

Recommended Posts

Posted

I'm back with another error after compiling the script I'm working on. For context: trying to revive an old script that's relatively simple, however this is not my area of expertise.

So I'm getting a "Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded." on line 14050.

Since that line is simply :

Global $2dg = [1111, "object"]

I started by simply commenting out the line to see where it leads. It simply bumps the error up to line 14049. The next hundred or so lines above this are all Globals so this shot in the dark didn't really get me anywhere. I'm aware this simply isn't enough information so if you want me to check something or provide additional information I can do so, but try to keep the wording simple.

It took lots of work to get the code to compile and I'm rather proud of my efforts so I'm not quite ready to consider this out of my skill range just yet.

Thanks in advance.

Posted

Before I go changing every variable in my 70,000 lines of code I tested that on this single line just to see, but it leads to the same error on the same line.

Posted

Not sure if this helps, I'm a little hesitant to post too much of this code on public forums due to my lack of knowledge about the original writer, and I certainly don't want to violate the possibility of their intent to keep their code private. Here's a bit more of a snippet of code leading up to this point with some variable's information partially obfuscated.

Global $26l = [$1uy, $1uz, $1v0, $1v1, $1v2, $1v3, $1v4, $1v5, $1v6, $1v7, $1v8, $1v9, $1va, $1vb, $1vc, $1vd, $1ve, $1vf, $1vg, $1vh, $1vi, $1vj, $1vk, $1vl, $1vm, $1vn, $1vo, $1vp, $1vq, $1vr, $1vs, $1vt, $1vu, $1vv, $1vw, $1vx, $1vy, $1vz, $1w0, $1w1, $1w2, $1w3, $1w4, $1w5, $1w6, $1w7, $1w8, $1w9, $1wa, $1wb, $1wc, $1wd, $1we, $1wf, $1wg, $1wh, $1wi, $1wj, $1wk, $1wl, $1wm, $1wn, $1wo, $1wp, $1wq, $1wr, $1ws, $1wt, $1wu, $1wv, $1ww, $1wx, $1wy, $1wz, $1x0, $1x1, $1x2, $1x3, $1x4, $1x5, $1x6, $1x7, $1x8, $1x9, $1xa, $1xb, $1xc, $1xd, $1xe, $1xf, $1xg, $1xh, $1xi, $1xj, $1xk, $1xl, $1xm, $1xn, $1xo, $1xp, $1xq, $1xr, $1xs, $1xt, $1xu, $1xv, $1xw, $1xx, $1xy, $1xz, $1y0, $1y1, $1y2, $1y3, $1y4, $1y5, $1y6, $1y7, $1y8, $1y9, $1ya, $1yb, $1yc, $1yd, $1ye, $1yf, $1yg, $1yh, $1yi, $1yj, $1yk, $1yl, $1ym, $1yn, $1yo, $1yp, $1yq, $1yr, $1ys, $1yt, $1yu, $1yv, $1yw, $1yx, $1yy, $1yz, $1z0, $1z1, $1z2, $1z3, $1z4, $1z5, $1z6, $1z7, $1z8, $1z9, $1za, $1zb, $1zc, $1zd, $1ze, $1zf, $1zg, $1zh, $1zi, $1zj, $1zk, $1zl, $1zm, $1zn, $1zo, $1zp, $1zq, $1zr, $1zs, $1zt, $1zu, $1zv, $1zw, $1zx, $1zy, $1zz, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $20a, $20b, $20c, $20d, $20e, $20f, $20g, $20h, $20i, $20j, $20k, $20l, $20m, $20n, $20o, $20p, $20q, $20r, $20s, $20t, $20u, $20v, $20w, $20x, $20y, $20z, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $21a, $21b, $21c, $21d, $21e, $21f, $21g, $21h, $21i, $21j, $21k, $21l, $21m, $21n, $21o, $21p, $21q, $21r, $21s, $21t, $21u, $21v, $21w, $21x, $21y, $21z, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $22a, $22b, $22c, $22d, $22e, $22f, $22g, $22h, $22i, $22j, $22k, $22l, $22m, $22n, $22o, $22p, $22q, $22r, $22s, $22t, $22u, $22v, $22w, $22x, $22y, $22z, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $23a, $23b, $23c, $23d, $23e, $23f, $23g, $23h, $23i, $23j, $23k, $23l, $23m, $23n, $23o, $23p, $23q, $23r, $23s, $23t, $23u, $23v, $23w, $23x, $23y, $23z, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $24a, $24b, $24c, $24d, $24e, $24f, $24g, $24h, $24i, $24j, $24k, $24l, $24m, $24n, $24o, $24p, $24q, $24r, $24s, $24t, $24u, $24v, $24w, $24x, $24y, $24z, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $25a, $25b, $25c, $25d, $25e, $25f, $25g, $25h, $25i, $25j, $25k, $25l, $25m, $25n, $25o, $25p, $25q, $25r, $25s, $25t, $25u, $25v, $25w, $25x, $25y, $25z, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $26a, $26b, $26c, $26d, $26e, $26f, $26g, $26h, $26i, $26j, $26k]
Global $26m[11] = [$1ve, $1vf, $1vg, $1vh, $1vi, $1vj, $1vk, $1vl, $1vm, $1vn, $242]
Global $26n[11][12] = [[$1vo, $1vp, $1vq, $1vr, $1vs, $1vt, $1vu, $1vv, $1vw, $1vx, $1vy, $1vz], [$1w0, $1w1, $1w2, $1w3, $1w4, $1w5, $1w6, $1w7, $1w8, $1w9, $1wa, $1wb], [$1wc, $1wd, $1we, $1wf, $1wg, $1wh, $1wi, $1wj, $1wk, $1wl, $1wm, $1wn], [$1wo, $1wp, $1wq, $1wr, $1ws, $1wt, $1wu, $1wv, $1ww, $1wx, $1wy, $1wz], [$1x0, $1x1, $1x2, $1x3, $1x4, $1x5, $1x6, $1x7, $1x8, $1x9, $1xa, $1xb], [$1xc, $1xd, $1xe, $1xf, $1xg, $1xh, $1xi, $1xj, $1xk, $1xl, $1xm, $1xn], [$1xo, $1xp, $1xq, $1xr, $1xs, $1xt, $1xu, $1xv, $1xw, $1xx, $1xy, $1xz], [$1y0, $1y1, $1y2, $1y3, $1y4, $1y5, $1y6, $1y7, $1y8, $1y9, $1ya, $1yb], [$1yc, $1yd, $1ye, $1yf, $1yg, $1yh, $1yi, $1yj, $1yk, $1yl, $1ym, $1yn], [$1yo, $1yp, $1yq, $1yr, $1ys, $1yt, $1yu, $1yv, $1yw, $1yx, $1yy, $1yz], [$1z0, $1z1, $1z2, $1z3, $1z4, $1z5, $1z6, $1z7, $1z8, $1z9, $1za, $1zb]]
Global $26o = [$22i, $22j, $22k, $22l, $22m, $22n, $22o, $22p]

Func _1ru($26p)
    Return $26m[$26p - 1]
EndFunc

Func _1rv($26q, $26p)
    Return $26n[$26p - 1][$26q - 1]
EndFunc

Func _1rw($26r)
    $26r = _1cj(0, _1ck(7, $26r))
    Return $26o[$26r]
EndFunc

Func _1rx($26s, $26t = False)
    $26u = $26s[0]
    $26v = _1f7($26u)
    $26w = BinaryMid($26v, 1, 1)
    $26x = BinaryMid($26v, 2, 1)
    If $26w = 0 Then
        $26w = BinaryMid($26v, 3, 1)
        $26x = BinaryMid($26v, 4, 1)
    EndIf
    If $26w = 0 Then
        If NOT $26t Then
            _1b2(StringFormat($za, $26s[1]))
        EndIf
        Return NULL
    EndIf
    $13g = _1cy($1ux, $26w)
    If $13g = NULL  Then
        If NOT $26t Then
            _1b2(StringFormat($zb, $26w, $26s[1]))
        EndIf
        Return NULL
    EndIf
    Local $26y = [$13g[1], $26x]
    Return $26y
EndFunc

Func _1ry($26s)
    Local $26u = $26s[0]
    Local $26v = _1f7($26u)
    Local $26w = BinaryMid($26v, 1, 1)
    Local $26x = BinaryMid($26v, 2, 1)
    If $26w = 0 Then
        $26w = BinaryMid($26v, 3, 1)
        $26x = BinaryMid($26v, 4, 1)
    EndIf
    Return Int($26w)
EndFunc

Global $26z = [2, "Thing1"]
Global $270 = [5, "Thing2"]
Global $271 = [9, "Thing3"]
Global $272 = [10, "Thing4"]
Global $273 = [17, "Thing5"]
Global $274 = [18, "Thing6"]
Global $275 = [20, "Thing7"]
Global $276 = [21, "Thing8"]
Global $277 = [22, "Thing9"]
Global $278 = [23, "Thing10"]
; + another couple hundred lines of these Globals.

Hopefully this provides SOME amount of additional context here. Though I'm aware simply tossing code up doesn't give the big picture of what's going on here, but maybe this can help someone in the request of a little more information about my issue.

Posted

Are you running this within Scite or compiled?  Also didn't realise you could actually declare the array without the count i.e.

#include <Array.au3>
Global $aArray1d = [1111, "object1"]
_ArrayDisplay($aArray1d)
Global $aArray2d = [[1111,1112],["object1", "object2"]]
_ArrayDisplay($aArray2d)

 

Posted

The error occurs once I "successfully" got the code to compile, and ran the executable. I am doing my editing in Notepad++, I'm not too familiar with Scite but I'm willing to dabble more in there if it helps me make progress.

That snippet begins on a line past the 10,000 range so there is certainly much more going on here.

Posted

Ah, running in Scite does give me a little more context to the error though.

"C:\Users\ME\Desktop\Compile\test.au3" (14753) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
Global $2wz = [$26z, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $27a, $27b, $27c, $27d, $27e, $27f, $27g, $27h, $27i, $27j, $27k, $27l, $27m, $27n, $27o, $27p, $27q, $27r, $27s, $27t, $27u, $27v, $27w, $27x, $27y, $27z, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $28a, $28b, $28c, $28d, $28e, $28f, $28g, $28h, $28i, $28j, $28k, $28l, $28m, $28n, $28o, $28p, $28q, $28r, $28s, $28t, $28u, $28v, $28w, $28x, $28y, $28z, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $29a, $29b, $29c, $29d, $29e, $29f, $29g, $29h, $29i, $29j, $29k, $29l, $29m, $29n, $29o, $29p, $29q, $29r, $29s, $29t, $29u, $29v, $29w, $29x, $29y, $29z, $2a0, $2a1, $2a2, $2a3, $2a4, $2a5, $2a6, $2a7, $2a8, $2a9, $2aa, $2ab, $2ac, $2ad, $2ae, $2af, $2ag, $2ah, $2ai, $2aj, $2ak, $2al, $2am, $2an, $2ao, $2ap, $2aq, $2ar, $2as, $2at, $2au, $2av, $2aw, $2ax, $2ay, $2az, $2b0, $2b1, $2b2, $2b3, $2b4, $2b5, $2b6, $2b7, $2b8, $2b9, $2ba, $2bb, $2bc, $2bd, $2be, $2bf, $2bg, $2bh, $2bi, $2bj, $2bk, $2bl, $2bm, $2bn, $2bo, $2bp, $2bq, $2br, $2bs, $2bt, $2bu, $2bv, $2bw, $2bx, $2by, $2bz, $2c0, $2c1, $2c2, $2c3, $2c4, $2c5, $2c6, $2c7, $2c8, $2c9, $2ca, $2cb, $2cc, $2cd, $2ce, $2cf, $2cg, $2ch, $2ci, $2cj, $2ck, $2cl, $2cm, $2cn, $2co, $2cp, $2cq, $2cr, $2cs, $2ct, $2cu, $2cv, $2cw, $2cx, $2cy, $2cz, $2d0, $2d1, $2d2, $2d3, $2d4, $2d5, $2d6, $2d7, $2d8, $2d9, $2da, $2db, $2dc, $2dd, $2de, $2df, $2dg, $2dh, $2di, $2dj, $2dk, $2dl, $2dm, $2dn, $2do, $2dp, $2dq, $2dr, $2ds, $2dt, $2du, $2dv, $2dw, $2dx, $2dy, $2dz, $2e0, $2e1, $2e2, $2e3, $2e4, $2e5, $2e6, $2e7, $2e8, $2e9, $2ea, $2eb, $2ec, $2ed, $2ee, $2ef, $2eg, $2eh, $2ei, $2ej, $2ek, $2el, $2em, $2en, $2eo, $2ep, $2eq, $2er, $2es, $2et, $2eu, $2ev, $2ew, $2ex, $2ey, $2ez, $2f0, $2f1, $2f2, $2f3, $2f4, $2f5, $2f6, $2f7, $2f8, $2f9, $2fa, $2fb, $2fc, $2fd, $2fe, $2ff, $2fg, $2fh, $2fi, $2fj, $2fk, $2fl, $2fm, $2fn, $2fo, $2fp, $2fq, $2fr, $2fs, $2ft, $2fu, $2fv, $2fw, $2fx, $2fy, $2fz, $2g0, $2g1, $2g2, $2g3, $2g4, $2g5, $2g6, $2g7, $2g8, $2g9, $2ga, $2gb, $2gc, $2gd, $2ge, $2gf, $2gg, $2gh, $2gi, $2gj, $2gk, $2gl, $2gm, $2gn, $2go, $2gp, $2gq, $2gr, $2gs, $2gt, $2gu, $2gv, $2gw, $2gx, $2gy, $2gz, $2h0, $2h1, $2h2, $2h3, $2h4, $2h5, $2h6, $2h7, $2h8, $2h9, $2ha, $2hb, $2hc, $2hd, $2he, $2hf, $2hg, $2hh, $2hi, $2hj, $2hk, $2hl, $2hm, $2hn, $2ho, $2hp, $2hq, $2hr, $2hs, $2ht, $2hu, $2hv, $2hw, $2hx, $2hy, $2hz, $2i0, $2i1, $2i2, $2i3, $2i4, $2i5, $2i6, $2i7, $2i8, $2i9, $2ia, $2ib, $2ic, $2id, $2ie, $2if, $2ig, $2ih, $2ii, $2ij, $2ik, $2il, $2im, $2in, $2io, $2ip, $2iq, $2ir, $2is, $2it, $2iu, $2iv, $2iw, $2ix, $2iy, $2iz, $2j0, $2j1, $2j2, $2j3, $2j4, $2j5, $2j6, $2j7, $2j8, $2j9, $2ja, $2jb, $2jc, $2jd, $2je, $2jf, $2jg, $2jh, $2ji, $2jj, $2jk, $2jl, $2jm, $2jn, $2jo, $2jp, $2jq, $2jr, $2js, $2jt, $2ju, $2jv, $2jw, $2jx, $2jy, $2jz, $2k0, $2k1, $2k2, $2k3, $2k4, $2k5, $2k6, $2k7, $2k8, $2k9, $2ka, $2kb, $2kc, $2kd, $2ke, $2kf, $2kg, $2kh, $2ki, $2kj, $2kk, $2kl, $2km, $2kn, $2ko, $2kp, $2kq, $2kr, $2ks, $2kt, $2ku, $2kv, $2kw, $2kx, $2ky, $2kz, $2l0, $2l1, $2l2, $2l3, $2l4, $2l5, $2l6, $2l7, $2l8, $2l9, $2la, $2lb, $2lc, $2ld, $2le, $2lf, $2lg, $2lh, $2li, $2lj, $2lk, $2ll, $2lm, $2ln, $2lo, $2lp, $2lq, $2lr, $2ls, $2lt, $2lu, $2lv, $2lw, $2lx, $2ly, $2lz, $2m0, $2m1, $2m2, $2m3, $2m4, $2m5, $2m6, $2m7, $2m8, $2m9, $2ma, $2mb, $2mc, $2md, $2me, $2mf, $2mg, $2mh, $2mi, $2mj, $2mk, $2ml, $2mm, $2mn, $2mo, $2mp, $2mq, $2mr, $2ms, $2mt, $2mu, $2mv, $2mw, $2mx, $2my, $2mz, $2n0, $2n1, $2n2, $2n3, $2n4, $2n5, $2n6, $2n7, $2n8, $2n9, $2na, $2nb, $2nc, $2nd, $2ne, $2nf, $2ng, $2nh, $2ni, $2nj, $2nk, $2nl, $2nm, $2nn, $2no, $2np, $2nq, $2nr, $2ns, $2nt, $2nu, $2nv, $2nw, $2nx, $2ny, $2nz, $2o0, $2o1, $2o2, $2o3, $2o4, $2o5, $2o6, $2o7, $2o8, $2o9, $2oa, $2ob, $2oc, $2od, $2oe, $2of, $2og, $2oh, $2oi, $2oj, $2ok, $2ol, $2om, $2on, $2oo, $2op, $2oq, $2or, $2os, $2ot, $2ou, $2ov, $2ow, $2ox, $2oy, $2oz, $2p0, $2p1, $2p2, $2p3, $2p4, $2p5, $2p6, $2p7, $2p8, $2p9, $2pa, $2pb, $2pc, $2pd, $2pe, $2pf, $2pg, $2ph, $2pi, $2pj, $2pk, $2pl, $2pm, $2pn, $2po, $2pp, $2pq, $2pr, $2ps, $2pt, $2pu,
Global $2wz = [$26z, ^ ERROR
>Exit code: 1    Time: 0.7506

 

Posted

I broke a line limit, lemme fix that real quick.

 

I have a running program it seems. Oh boy a thread just for this 😕

 

More work to do to get it stabilized, but I have GUI now so that's a huge weight off my shoulders.

While I'm here, is there no way to edit a comment on this site? I don't like spamming separate comments like this.

Posted

Strange, not an option. Maybe because I'm new here? I won't take up more of your time though, thanks for leading me in the right direction.

Posted

 

5 hours ago, alkado said:

While I'm here, is there no way to edit a comment on this site? I don't like spamming separate comments like this.  ...

Strange, not an option. Maybe because I'm new here?

As far as I know, the EDIT option only appears when the following conditions are met :
- a certain amount of posts (5 +).
- when your status changes from New Member to Member (24+ hours after joining the forum :think:)

Then this options should appear :

EditOption.jpg.245c6bcc6f9df332cc2eb68255b56c7a.jpg

You may also ask @Jos to unlock this option, but this will happen automatically soon anyway.

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...