se7enet purgatorio

Page 1 of 1 1
Topic Options
Rate This Topic
#18651 - 11/03/08 09:33 PM Classonly not working.
norrec
Malt-o-Meal


Registered: 10/22/08
Posts: 8

Offline
Hey again,

Well turns out class only isn't working, but classexclude is.
I have 5 classes.
If I put classexclude class 3: All classes but 3 will have spell.
If I put classonly 3: Everyone will have it.

Since I don't know much about php, hopefully someone can spot an error in this code.
here is the code in the users.php
I hope its the correct one.

 PHP:
if ($userrow["levelspell"] != 0) { $row["spelldropdowns"] = ""; for ($j=0; $j<$userrow["levelspell"]; $j++) { $row["spelldropdowns"] .= "<select name=\"spell$j\"><option value=\"0\">Pick One</option>\n"; foreach($spells as $a=>$b) { if (($b["minlevel"] <= $userrow["level"]) && ($b["classonly"] == $userrow["charclass"] ^ $b["classexclude"] != $userrow["charclass"])) { $row["spelldropdowns"] .= "<option value=\"".$b["id"]."\">".$b["name"]."</option>\n"; }



Thanks for the help.


Edited by norrec (11/03/08 09:35 PM)

Top
#18654 - 11/04/08 09:04 AM Re: Classonly not working. [Re: norrec]
Dragonking
Grape Nuts


Registered: 12/09/06
Posts: 39

Offline
I believe it's this:

 PHP:
if (($b["minlevel"] <= $userrow["level"]) && ($b["classonly"] == $userrow["charclass"] ^ $b["classexclude"] != $userrow["charclass"])) {


Should be:

 PHP:
if (($b["minlevel"] <= $userrow["level"]) && ($b["classonly"] == $userrow["charclass"] & $b["classexclude"] != $userrow["charclass"])) {

Top
#18655 - 11/04/08 09:16 AM Re: Classonly not working. [Re: Dragonking]
norrec
Malt-o-Meal


Registered: 10/22/08
Posts: 8

Offline
 Originally Posted By: Dragonking
I believe it's this:

 PHP:
if (($b["minlevel"] <= $userrow["level"]) && ($b["classonly"] == $userrow["charclass"] ^ $b["classexclude"] != $userrow["charclass"])) {


Should be:

 PHP:
if (($b["minlevel"] <= $userrow["level"]) && ($b["classonly"] == $userrow["charclass"] & $b["classexclude"] != $userrow["charclass"])) {



Perfect. Awesome, thanks for the help mate.
Appreciate it

Top
Page 1 of 1 1


Hop to:

se7enet

Barack Obama Logo