PVJsquad Posted January 23, 2013 Author Share Posted January 23, 2013 this is a sub```Sub SetGuildLogo(ByVal Index As Long)Dim i As Longi = rand(1, MAX_GUILD_LOGO)'i = 8GuildData(Index).Guild_Logo = iCall SaveGuild(Index)Call SavePlayer(Index)PlayerMsg Index, "Logo Guild Kamu Secara Acak [" & GuildData(Index).Guild_Logo & "].", BrightGreen'Update user for guild name displayCall SendPlayerData(Index)End Sub```why when i call the sub it will sound "Subscript Out Of Range" on the line to```GuildData(Index).Guild_Logo = i``` Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 23, 2013 Share Posted January 23, 2013 Hold the youse over every word and see on which it shows you the Subscript out of rangeThat maybe help :-)Else write which word is the Subscript out of range Link to comment Share on other sites More sharing options...
abhi2011 Posted January 23, 2013 Share Posted January 23, 2013 I am not sure but maybe index might be greater than MAX_GUILDS(If there is one)If so add a check after declaring 'i'. Here is how it should be```if index < 1 or index > max_guilds then exit sub``` Link to comment Share on other sites More sharing options...
PVJsquad Posted January 24, 2013 Author Share Posted January 24, 2013 Thank> I am not sure but maybe index might be greater than MAX_GUILDS(If there is one)> > If so add a check after declaring 'i'. Here is how it should be> > ```> > if index < 1 or index > max_guilds then exit sub> > ```Thank you is helped Link to comment Share on other sites More sharing options...
abhi2011 Posted January 24, 2013 Share Posted January 24, 2013 Glad i could help 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