Jump to content

Can't Get Byref To Work In This One Situation


Recommended Posts

This is the output I get:

>C:\Program Files\AutoIt3\SciTE\CompileAU3\CompileAU3.exe /beta /AU3Check /in "C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3"
>Running AU3Check   C:\Program Files\AutoIt3\SciTE\Defs\Unstable\Au3Check\au3check.dat
C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3(496,37) : ERROR: _UnpackStrToVar() previously called with Const or exp[b][/b]ression on ByRef param(s).
Func _UnpackStrToVar(ByRef $sVarStr)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3(388,38) : REF: first call to _UnpackStrToVar().
            Return _UnpackStrToVar($sReturnStr)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3 - 1 error(s), 0 warning(s)
>AU3Check Ended with Error(s).
>Exit code: 0   Time: 0.438

It says I can't use ByRef in the declaration of the function because it's already been called with a Const or expression in line 388. It's definitely not a Const or expression though, I've checked and redouble-checked. I've attached the script.

Edited by neogia

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

Nevermind, I found it, there was actually another place where i called _UnpackStrToVar() that did use an expression, but not line 388, line 411. It seems this is a bug with Scite?

Edit: Yay! 100th post.

Edited by neogia

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

  • Moderators

This is the output I get:

>C:\Program Files\AutoIt3\SciTE\CompileAU3\CompileAU3.exe /beta /AU3Check /in "C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3"
>Running AU3Check   C:\Program Files\AutoIt3\SciTE\Defs\Unstable\Au3Check\au3check.dat
C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3(496,37) : ERROR: _UnpackStrToVar() previously called with Const or exp[b][/b]ression on ByRef param(s).
Func _UnpackStrToVar(ByRef $sVarStr)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3(388,38) : REF: first call to _UnpackStrToVar().
            Return _UnpackStrToVar($sReturnStr)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Ben\Desktop\Multithreading\Coroutine.au3 - 1 error(s), 0 warning(s)
>AU3Check Ended with Error(s).
>Exit code: 0   Time: 0.438

It says I can't use ByRef in the declaration of the function because it's already been called with a Const or expression in line 388. It's definitely not a Const or expression though, I've checked and redouble-checked. I've attached the script.

This seems to be the problem:

_UnpackStrToVar(StdoutRead($iPID))

Wonder why it kept saying line 388 though?

Edit:

:) You already found it!! oh well... good job!

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

This seems to be the problem: Wonder why it kept saying line 388 though?

Edit:

:) You already found it!! oh well... good job!

Thanks for the quick reply, Smoke_N. Yeah, I'm wondering the same thing. Maybe this needs to be brought up to the SciTE team?

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

Thanks for the quick reply, Smoke_N. Yeah, I'm wondering the same thing. Maybe this needs to be brought up to the SciTE team?

It wouldn't be a SciTE problem, it's an Au3Check problem

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...