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 


IF statements

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


Joined: 04 Jun 2004
Posts: 4

PostPosted: Fri Jun 04, 2004 8:53 pm    Post subject: IF statements Reply with quote

I am trying to write an IF/ELSE Statement basically I have variable N
If N is equal to 1,2,3... then I need that value matched to another variable

%S = @INPUT(Please enter you Store Number)
IF %S = 1
%N = Downtown
END
IF %S = 2
%N = DT2
END

I gues I am using the IF function in correctly because if you input 1 as the store number the variable %N still shows up as DT2 instead of Downtown
Any help would be appreciated.

pozz
________
Mercedes-Benz C291 history


Last edited by pozzwali on Tue Feb 01, 2011 4:11 am; edited 1 time in total
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Jun 04, 2004 11:32 pm    Post subject: Reply with quote

Welcome Pozzwali,
Let me help you with the big bad IF Wink
The code below is for pre VDS 5.x
Code:

%S = @INPUT(Please enter you Store Number)
IF @Equal(%S,1)
%N = Downtown
Else
  If @Equal(%S,2)
    %N = DT2
  Else
    %N = ERROR
  End
End


The code below is for VDS 5.x and newer
Code:

%S = @INPUT(Please enter you Store Number)
IF @Equal(%S,1)
%N = Downtown
ElsIF @Equal(%S,2)
  %N = DT2
Else
 %N = ERROR
End


Have fun...

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Sat Jun 05, 2004 11:08 am    Post subject: Reply with quote

Hi pozzwali, and welcome to the forums Smile

I advice you to get used to the elsif statements - with bigger scripts these
statements are much more easier to read and adapt. But you'll have to
be using vds 5, as dragonsphere mentioned above.

Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jun 05, 2004 1:06 pm    Post subject: Reply with quote

I thought ElsIf was there in VDS 4 too. Maybe my mind is decieveing me. Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sat Jun 05, 2004 7:37 pm    Post subject: Reply with quote

Yep, it is in VDS 4 also.
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun Jun 06, 2004 12:56 am    Post subject: Reply with quote

No clue Oops I have never used VDS 4. I skipped that version. I went from 3.51 to VDS 5.x Wink
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
pozzwali
Newbie


Joined: 04 Jun 2004
Posts: 4

PostPosted: Mon Jun 07, 2004 1:49 pm    Post subject: Reply with quote

Thanks DragonSphere that did the trick
________
drug testing


Last edited by pozzwali on Tue Feb 01, 2011 4:11 am; edited 1 time in total
Back to top
View user's profile Send private message
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Tue Jun 15, 2004 4:34 pm    Post subject: Reply with quote

There is an ELSIF in VDS 4??? OMG!!! I had never noticed! Embarassed Embarassed Embarassed
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Jun 15, 2004 6:57 pm    Post subject: Reply with quote

Whoa! Now it's like a new feature! Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
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