_SeVeN137_
08-02-2002, 08:10 PM
I need help for a hack im writing... I need to know the syntax for hacking two conditions on the same line, so that if both conditions are satisfied then do this and this and blah blah blah etc.
Here's an example of what I tried, but generated a parse error:
if ($post[rpgclass] == "7" and $post[posts] > 0) {
$limit="Braver"
} elseif ($post[rpgclass] == "7" and $post[posts] > 19) {
$limit="Cross-slash"
} elseif ($post[rpgclass] == "7" and $post[posts] > 39) {
$limit="Blade Beam"
} elseif ($post[rpgclass] == "7" and $post[posts] > 59) {
$limit="Climhazzard"
} elseif ($post[rpgclass] == "7" and $post[posts] > 79) {
$limit="Finishing Touch"
} elseif ($post[rpgclass] == "7" and $post[posts] > 99) {
$limit="Omnislash"
} elseif ($post[rpgclass] == "7" and $post[posts] > 149) {
$limit="Cherry Blossom"
} elseif ($post[rpgclass] == "7" and $post[posts] > 199) {
$limit="Night Sword"
} elseif ($post[rpgclass] == "7" and $post[posts] > 249) {
$limit="Divine Blade"
} elseif ($post[rpgclass] == "7" and $post[posts] > 499) {
$limit="Shellbust Stab"
} elseif ($post[rpgclass] == "7" and $post[posts] > 999) {
$limit="Ultima"
}
Help meh please ^_^
Here's an example of what I tried, but generated a parse error:
if ($post[rpgclass] == "7" and $post[posts] > 0) {
$limit="Braver"
} elseif ($post[rpgclass] == "7" and $post[posts] > 19) {
$limit="Cross-slash"
} elseif ($post[rpgclass] == "7" and $post[posts] > 39) {
$limit="Blade Beam"
} elseif ($post[rpgclass] == "7" and $post[posts] > 59) {
$limit="Climhazzard"
} elseif ($post[rpgclass] == "7" and $post[posts] > 79) {
$limit="Finishing Touch"
} elseif ($post[rpgclass] == "7" and $post[posts] > 99) {
$limit="Omnislash"
} elseif ($post[rpgclass] == "7" and $post[posts] > 149) {
$limit="Cherry Blossom"
} elseif ($post[rpgclass] == "7" and $post[posts] > 199) {
$limit="Night Sword"
} elseif ($post[rpgclass] == "7" and $post[posts] > 249) {
$limit="Divine Blade"
} elseif ($post[rpgclass] == "7" and $post[posts] > 499) {
$limit="Shellbust Stab"
} elseif ($post[rpgclass] == "7" and $post[posts] > 999) {
$limit="Ultima"
}
Help meh please ^_^