Jump to content

Recommended Posts

Posted (edited)

I've been playing around quite a bit, and i can't get this solved.

global $songname[100];
$songname[$num]=$song7;
msgbox(0,"",$songname[$num] & $num)
$num=$num+1

$song7 will be a string that will be different every 'loop', and i want to save all song titels in an array. It seems

that my code does not work, in fact it gives the error:

Array variable has incorrect number of subscripts....

Some help with this would be wonderfull :)

Edited by jasperdj
Posted (edited)

Hi jasperdj,

the errormessage you get is typically for accessing an index in the array that does not exist.

E.g. dim $songname[100] defines you an array from $songname[0] to $songname[99], if you try to access $songname[100] it will crash and give you the "Array variable has incorrect number of subscripts" message.

Edited by Hannes123
Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

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...