forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


vdsdll.dll Bug or VDS Bug ???

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Tue Sep 24, 2002 3:35 pm    Post subject: vdsdll.dll Bug or VDS Bug ??? Reply with quote

Code:
 
external @path(%0)vdsdll.dll
%%user = @dll(util,username)
INIFILE  OPEN,users.ini
%%GRP = @INIREAD(%%user,Group)
%%CAD = @INIREAD(%%user,CAD)
%%HIDE = @INIREAD(%%user,Hide)
%%CLOSE = @INIREAD(%%user,Close)


The above variable %%user returns: Nathan Clarke

The inifile user.ini is structed like this:

[Nathan Clarke]
Group=student
CAD=1
Hide=
Close=No

When it is reading %%grp, %%cad it returns nothing ????

Any ideas..

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Tue Sep 24, 2002 3:38 pm    Post subject: Reply with quote

Use a path @path(%0)users.ini on you're inifile open command otherwise I think it tries to create/read the inifile from the windows/system directory.
Back to top
View user's profile Send private message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Tue Sep 24, 2002 3:41 pm    Post subject: Nope did not work !!! Reply with quote

I tried that PGWARE, still no result Sad

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Tue Sep 24, 2002 3:46 pm    Post subject: Reply with quote

Try "inifile open,.\users.ini", otherwise it'll probably try to load the inifile from the Windows
directory in which such a file doesn't exist. This way it will load the inifile from the current
directory.

Edit:
Oops, I didn't notice PK already replied with something similar.


Last edited by Tommy on Tue Sep 24, 2002 4:59 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Tue Sep 24, 2002 3:52 pm    Post subject: Reply with quote

I'll tell you what i am trying to do:

retrieve the current users name and then open a file so that there preferences can be applied.

I tried:

external @path(%0)vdsdll.dll
%%user = @dll(util,username)

list create,1
list loadfile,1,%%user.txt
etc
etc

But VDS could not open Nathan Clarke.txt

Is there any way to do this??
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Tue Sep 24, 2002 3:56 pm    Post subject: Reply with quote

Change it to >

Code:

list loadfile,1,%%users".txt"


You should always put normal text that is right after a variable in parantheses when there is no space in between, otherwise vds thinks you are trying to access the variable %%users.txt and that variable doesn't exist but %%users does.
Back to top
View user's profile Send private message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Tue Sep 24, 2002 4:11 pm    Post subject: Reply with quote

I'm tearing my hair out, whats left of it anyway. Evil or Very Mad

I can't get this thing to work.

I want to retrieve the current username.

Then open a text file eg.

%%curuser = Nathan Clarke

Open file into a list

list loadfile,whatever,Nathan Clarke.txt

I just can't get this to work !!

If i manual put in Nathan Clarke it works ! But I want VDS or vdsdll.dll to retreive the username because it will change.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Wed Sep 25, 2002 3:16 am    Post subject: Reply with quote

Code:

  external @path(%0)vdsdll.dll
 
%%user = @dll(util,username)

info @len(%%user)

list create,1
list add,1,%%user
list savefile,1,@path(%0)%%user.txt


This script works perfectly fine on my pc...running win98 vds3.5 using vdsdll version 3.17.0.0 which I DL'd from sools.com just to help you Wink

The only thing I can think of wrong with your original script is not your original script, it's the DLL, or the windows version your working with.

Windows xp and 2000/nt handle things a bit differently than me/98/95, so if your using one of those that might be it.

My other thought is that you should REALLY CHECK the VDSDLL in your directory and make sure it is version 3.x, there are a few different vdsdll's on my pc, maybe you popped the wrong one in the directory by mistake.

The len function is there to see if maybe your windows version is returning leading or trailing spaces.... just a thought.

NodNarb
Back to top
View user's profile Send private message AIM Address
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Wed Sep 25, 2002 4:33 am    Post subject: Reply with quote

A good way to debug what is happening to you're variables is to see them before they perform any action.

Do this before you use the LIST LOADFILE command>

Code:

warn %%user


You can use the warn %%user also in a few other places to see where the variable is ending up going wrong. This will let you see why you're variable has changed or if there is nothing wrong with it at all.
Back to top
View user's profile Send private message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Wed Sep 25, 2002 8:21 am    Post subject: Reply with quote

I think I found the BUG:

I am using Windows XP and VDS 4.5

vdsdll.dll version 3.17

When I use this Command !
Code:

  external @path(%0)vdsdll.dll
 %%user = @dll(util,username)
info @len(%%user)


The value returned is : 14

My username is: Nathan Clarke

And when I do:
Code:

info @len(Nathan Clarke)


It returns : 13 ????

Anyone any ideas ?????

The dll is added an extra Space like below:

Nathan Clarke (when is meant to be)
Nathan Clarke

????? Weird ?????
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Sep 25, 2002 8:31 am    Post subject: Reply with quote

Not sure why it'd do that, but you should be able to use @TRIM to fix it.
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Wed Sep 25, 2002 10:01 am    Post subject: SO SORRY :) Reply with quote

I sorry, Crying or Very sad

I messed up, I checked the registry and in the registry my username has
14 characters two spaces between Nathan & Clarke.

So there is no bug at all.

Sorry for the hassle guys.

(i feel so stupid 8O )

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Wed Sep 25, 2002 6:33 pm    Post subject: Reply with quote

Believe me, you're not the first to make a mistake like that. I think we've all done something similar. Smile
Back to top
View user's profile Send private message Send e-mail
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Wed Sep 25, 2002 6:55 pm    Post subject: Reply with quote

He's right, your not the first one to make that mistake, just look at America Online's title bar (with window spy or something)!!

NodNarb
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group