• Log in or sign up for an account here: https://www.sythe.org/login

Operator '&' is not defined...?

megajosh2

Member
Joined
Apr 18, 2008
Sythe Gold
0
Messages
59
Location
How long can you make this thing? I wond
I got this code in my vb file:
Code:
        [COLOR="Blue"]Do While[/COLOR] i < 25
            ListBox1.Items.Add([U]SkillName(i) & [COLOR="Red"]": "[/COLOR] & SkillData[/U])
            i = i + 1
        [COLOR="Blue"]Loop[/COLOR]

The underlined code is underlined blue in VB2008 and the error message is:
Code:
Operator '&' is not defined for types 'String' and '1-dimensional array of String

I don't know if maybe it has something to do with this:

Code:
[COLOR="Blue"]Dim[/COLOR] SkillInfo = Split(Data, [COLOR="Red"]" "[/COLOR])
or this (all the code references are higher than each other in the script):
Code:
[code]Data = Web.DownloadString("[U][COLOR="Red"]http://hiscore.runescape.com/index_lite.ws?player=" & userName)[/COLOR][/U]
 
Code:
Dim SkillInfo = Split(Data, " ")

You should set it to a string you havn't classed it as anything.

Code:
Dim SkillInfo as string = Split(Data, " ")[code]

also SkillName(i) and SkillData, How are they generated?
 
Runescape Gamblingrunescape gambling
Back
Top