Jump to content

Unusual error... [SOLVED]


disc330
 Share

Recommended Posts

Been using Irrlicht for a while, and I have used the AddCubeSceneNode() & SetPosition() finctions since the begining.

They used to work fine, but suddenly today i have started getting an error:

CODE
ERROR: AddCubeSceneNode() called with Const or expression on ByRef-param(s).

$TestBoxNode = AddCubeSceneNode(2)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

builtin(55,47) : REF: definition of AddCubeSceneNode().

Never heard of this error before, so as a workaround I could just use a variable for every parameter. That was bad enough, but then I got:

CODE
ERROR: SetPosition() called with Const or expression on ByRef-param(s).

SetPosition($PlayerNode, GetAbsolutePosition($TestBoxNode , "X"), 0 , GetAbsolutePosition($TestBoxNode , "Z"))

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

builtin(56,74) : REF: definition of SetPosition().

I refuse to use variables in SetPosition(). (Note that where the '0' is in SetPosition, I have tried a variable. Its not the number but the functions.) If any other IrrLichters have had this error could you please help me out. Have no idea what it could be other than an include file, but I tried the code without them one by one and i still got it. I am not using any mode of MustDeclareVars and I haven't recieved this error in other scripts. *clueless* =/

Thanks for reading, and super thanks for any help.

Edited by disc330

Still learning...I love autoit. :)

Link to comment
Share on other sites

try saving the functions to variables

Exactly what I'm trying to avoid.

I'll give it a try for the sake of a breakthrough, but I don't see why I should have to because I never have HAD to before...

Thanks for the input anyway and happy Valentines day!

Still learning...I love autoit. :)

Link to comment
Share on other sites

:) Ok, well I tried to just run it by double clicking the icon instead of hitting F5, worked fine. Turns out the whole thing was because of my bad order of Includes. All working now though, and I probably wouldn't have found that tonight if it wasn't for you Richard Robertson so thanks very much. :)

Still learning...I love autoit. :)

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...