View previous topic :: View next topic |
Author |
Message |
ironhorse
Joined: 02 May 2005 Posts: 13 Location: uk
|
Posted: Thu May 05, 2005 21:54 Post subject: if statement |
|
|
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 |
|
|
Mask
Joined: 20 Mar 2005 Posts: 12
|
Posted: Wed May 25, 2005 7:55 Post subject: Re: if statement |
|
|
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 |
|
|
|
|
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
|