OpenFile with #PB_Any

Just starting out? Need help? Post your questions and find answers here.
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

OpenFile with #PB_Any

Post by MrTAToad »

Is supposed to return > 0 if okay or 0 if there was an error. At the moment though it returns [object Object]
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: OpenFile with #PB_Any

Post by Fred »

Could you post a small snippet showing the issue ? It seems to display a number here:

Code: Select all

Debug OpenFile(#PB_Any, "", 0)
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

Re: OpenFile with #PB_Any

Post by MrTAToad »

Sorry, for some reason it happens when not using #PB_Any :

Code: Select all

Debug OpenFile(0, "", 0)
You get :
[object Object]
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: OpenFile with #PB_Any

Post by Fred »

It returns nonzero if it doesn't fail (like all other commands, when using a number it returns the same value as xxxID() function).
Post Reply