jasperdj Posted August 1, 2011 Share Posted August 1, 2011 (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 seemsthat 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 August 1, 2011 by jasperdj Link to comment Share on other sites More sharing options...
hannes08 Posted August 1, 2011 Share Posted August 1, 2011 (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 August 1, 2011 by Hannes123 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
jasperdj Posted August 1, 2011 Author Share Posted August 1, 2011 Ahhh yes how obvious, $num was way above 100. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now