logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
if statement

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
ironhorse



Joined: 02 May 2005
Posts: 13
Location: uk

PostPosted: Thu May 05, 2005 21:54    Post subject: if statement Reply with quote

I am after getting one piece of info from my SQL database and I cannot get the thing right.

I want an if statement that if a certain part has a 1 in it I want it to save the persons location, but I dont know how to lay out the if line

this is the script that creates the entry

if (!GetPersistentInt(oPC, "Stripped"))
{
SetPersistentInt(oPC, "Stripped", 1);

I want it in the other file to check that it is there?

any ideas please

Ironhorse
Back to top
View user's profile Send private message Visit poster's website
Mask



Joined: 20 Mar 2005
Posts: 12

PostPosted: Wed May 25, 2005 7:55    Post subject: Re: if statement Reply with quote

Code:
if (!GetPersistentInt(oPC, "Stripped"))
{
SetPersistentInt(oPC, "Stripped", 1);
}


That's your code right?

I think I read it right to mean you want something like this...

Code:
if (GetPersistentInt(oPC, "Stripped")==0)   /*Only fires if the INT "Stripped" is 0*/
//if (GetPersistentInt(oPC, "Stripped")!=1)   /*If the above is not what you want, try removing the comment denotations at the frist part of this line.  If the INT Is-Not 1, it will fire.*/
{
SetPersistentInt(oPC, "Stripped", 1);
}


If I missed the idea, you'll have ot elaborate a bit more for me.
_________________
DM Mask


Legacy of Netheril
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group