Page 1 of 2 12>
Topic Options
#156220 - 2006-01-29 12:35 AM This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
I have the following code giving me an error and I can not figure out what it is complaining about.

Quote:

ERROR : Error in expression: this type of array not supported in expressions.!




It is complaining at this line
Quote:

$LabelG.text + @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF




I have the exact same code in another function and it works just fine.

In troubleshooting: If I ? $a immediatly after the $a=PartnerSelect() I get the expected string. If $a = "your choice" the else statement works just fine.

I also thought that it might be complaining about the use of an array on the If $b[2] = 1 line, but added a $c = $b[2] and then If $c = 1, but it still complained.

My assumption is that it is the Line before the one reported, (the if statement) that is really the problem, but not sure what I am doing wrong in writing it.

$B[x] is always a 0 or 1 and $ExVar is always 1 - 6

Code:

Function O($PU)
$ = Split($Name[$PU,3],"~")
;$N = $Name[$PU,0]
If $[2] = 1 Or $ExVar < 4
$a = PartnerSelect($PU)
If $a <> "your choice"
$b = Willing($a)
If $b[2] = 1 Or $ExVar < 4
$LabelG.text + @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF
Pause()
EndIf
Else
$LabelG.text = $LabelG.text + @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF
Pause()
EndIf
Else
;Fix the label to explain more
$LabelG.text = $LabelG.text + @CRLF + "Sorry you do not have a preference, your loss"
Pause()
EndIf
EndFunction

_________________________
Today is the tomorrow you worried about yesterday.

Top
#156221 - 2006-01-29 12:45 AM Re: This type of array not supported
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Try assembling the string concatenation separately to a simple var.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156222 - 2006-01-29 12:51 AM Re: This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Not sure I get what you mean... is this it...

Code:

If $a <> "your choice"
$b = Willing($a)
$c = $b[2]

If $c = 1 Or $ExVar < 4
$LabelG.text + @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF
Pause()
EndIf
Else



Because I did try that and it did not help any.


Edited by Gargoyle (2006-01-29 12:59 AM)
_________________________
Today is the tomorrow you worried about yesterday.

Top
#156223 - 2006-01-29 01:20 AM Re: This type of array not supported
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
No, I was thinking to separate it from the $LabelG.text

Are you sure about the line:
$LabelG.text + @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF

SHould not it be:
$LabelG.text = @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156224 - 2006-01-29 01:28 AM Re: This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
You are correct it should be an = not a +, but that is a typo on my part, and after correcting it, I still have the same issue.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#156225 - 2006-01-29 01:31 AM Re: This type of array not supported
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The error usually is the result of mixing vartype. That was why I thought you might try variations on the concatenation.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156226 - 2006-01-29 11:53 AM Re: This type of array not supported
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22333
Loc: OK
well, what is:
$Name[$PU,0] ???
_________________________
!

download KiXnet

Top
#156227 - 2006-01-29 04:15 PM Re: This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
It would return a name ex: Gargoyle
_________________________
Today is the tomorrow you worried about yesterday.

Top
#156228 - 2006-01-29 04:54 PM Re: This type of array not supported
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I would throw this tracer:

?"VarType=" + VarTypeName($Name[$PU,0])

and this one:

?"Value=" + $Name[$PU,0]

just before that line and check-out the values.

Top
#156229 - 2006-01-29 05:13 PM Re: This type of array not supported
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Just going from memory but ISTR that some COM objects have problems with certain vartypes. Might be that $LabelG.text cannot handle the expression @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF so I suggested a variation on the concatenation.
Maybe:
$String = @CRLF + $Name[$PU,0] +" Please share with " + $a + @CRLF
$LabelG.text = $String
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156230 - 2006-01-29 05:52 PM Re: This type of array not supported
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22333
Loc: OK
no, that would not be problem with com but with kixtart if that would be the case.
_________________________
!

download KiXnet

Top
#156231 - 2006-01-29 06:08 PM Re: This type of array not supported
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I'm not pointing fingers nor splitting hairs.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156232 - 2006-01-29 08:22 PM Re: This type of array not supported
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22333
Loc: OK
neither was I.
I just said the change won't help.
_________________________
!

download KiXnet

Top
#156233 - 2006-01-29 10:46 PM Re: This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Return from Shawns request... $Name[$PU,0]
Quote:


VarType=String
Value=Nancy



I added this one
Quote:


VarType for $a=String
Value=Cheryl



ERROR : Error in expression: this type of array not supported in expressions.!

The last ? Value = was placed just before the line
If $a <> "your choice"

And this is with putting in the suggested
$text = @CRLF + $Name[$PU,0] +" please share with " + $a + @CRLF
$LabelG.text = $text

I still believe the real issue is the line before the reported error.. this one
If $b[2] = 1 Or $ExVar < 4

To that end I got these returns
Quote:



1=Value of $B[2]
String= Type of Var for $B[2]
1=Value of $ExVar
Long=Type of Var for $ExVar


_________________________
Today is the tomorrow you worried about yesterday.

Top
#156234 - 2006-01-29 11:16 PM Re: This type of array not supported
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Well, your going to have to do what I do ... put two tracers after each line in your script (even if they just say "before" and "after" and keep moving them around until you see only the "before" tracer - do it all the time - painfull I know, but you got a general idea where it is.
Top
#156235 - 2006-01-29 11:41 PM Re: This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Okay, the results are as such

Before and After for If $b[2] = 1 Or $ExVar < 4
Before for $text = @CRLF + $Name[$PU,0] +" please share with " + $a + @CRLF
But no After, so I geuss it is that line (my bad). However what am I doing wrong in this instance of it, but can do it in other places with no problem. I am sure that it is just a simple typo or something like that....

As an example: I use this line in another function in the script and it works just fine...

Code:

$LabelG.Text = $LabelG.Text + @CRLF + $Name[$PU,0] + " You get to remove your " + $Item +". Your partner is " + $a +@CRLF



I have tried it with the $labelG.text = $labelg.text ....

But removed it when I got the same results, and did not want it at this point in the script as I am wanting to completly reassign the value of $labelG.text
_________________________
Today is the tomorrow you worried about yesterday.

Top
#156236 - 2006-01-30 12:15 AM Re: This type of array not supported
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

... put two tracers after each line... just say "before" and "after" and keep moving them around...



I just toss in a whole bunch at one time and number them. Saves moving them around.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156237 - 2006-01-30 12:22 AM Re: This type of array not supported
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Well, Im not surprised this line would work elsewhere in your script ... seems like this is a contextual error, depends on whats happen'n at the time - a tough bug to catch but as you can appreciate, without the script, cant offer much help (speaking for myself anyways).
Top
#156238 - 2006-01-30 01:54 AM Re: This type of array not supported
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Quote:

without the script



There in lies the problem, this script is huge and is as Shawn and Jooel know adult in nature.

Just to give you an idea of how big... The main script is only 349 lines, but the functions script is another 822, plus all the different forms scripts, and then there is the huge bitmap script (all of my base64 strings).

So with that said, I can post it or send it to anyone that wants to see how twisted of an individual I really am.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#156239 - 2006-01-30 02:08 AM Re: This type of array not supported
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22333
Loc: OK
so, if you change your labelG line to something like:
$LabelG.text = "stuff"

does it still error?
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (fergieman101) and 175 anonymous users online.
Newest Members
emnipetro, Hirze, thequeen, ameliaryan, shalomsalami
17641 Registered Users

Generated in 0.042 seconds in which 0.013 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org