if (c.Member = true) {
You need to change something there i think.
|
Not really a command, but same thing.
I'm trying to get this to work. But any non-member can click this button. So when it's checking to see if "Member = false" it's not working.
Same problem here with this button also,Code:case 107230: //Donator Only Restore Special if (c.Member = true) { if (c.inWild()) { c.sendMessage("You cannot restore your special attack while in combat."); c.setSidebarInterface(4, 1644); } else { c.specAmount = 10; c.sendMessage("You fully restore your special attack."); c.setSidebarInterface(4, 1644); if (c.Member = false) { c.sendMessage("You need to be a donator!"); } } } break;
Code:case 107231: if (c.Member = true && (c.oneTime == 1)) { c.sendMessage("You already have gotten your donator package."); c.setSidebarInterface(4, 1644); } else { c.oneTime = 1; c.getItems().addItem(995, 15000000); c.getItems().addItem(9813, 1); c.getItems().addItem(10721, 1); c.getItems().addItem(10723, 1); c.setSidebarInterface(4, 1644); if (c.Member = false) c.sendMessage("You are not a donator."); c.setSidebarInterface(4, 1644); } break;
see if that works for the first button.Code:if (c.Member) { if (c.inWild()) { c.sendMessage("You cannot restore your special attack while in combat."); c.setSidebarInterface(4, 1644); } else { c.specAmount = 10; c.sendMessage("You fully restore your special attack."); c.setSidebarInterface(4, 1644); } } else if(!c.Member) { c.sendMessage("You need to be a donator!"); }
and then the second button
BTW you really need to look at how if else statements workCode:if(c.Member) { if(c.oneTime == 1) { c.sendMessage("You already have gotten your donator package."); c.setSidebarInterface(4, 1644); } else { c.oneTime = 1; c.getItems().addItem(995, 15000000); c.getItems().addItem(9813, 1); c.getItems().addItem(10721, 1); c.getItems().addItem(10723, 1); c.setSidebarInterface(4, 1644); } } else { c.sendMessage("You are not a donator."); c.setSidebarInterface(4, 1644); }
(Member == 1) ??
All you gotta do is search threads on the forums!
look = is an assigment
if(member = true) means
if((set member to true)
and because if(condition) it always gets executed
u just gotta do if(member) { }else { }
if im confusing you :
Control Flow Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
because this code is bullshit
Hmm.. Not Sure Sorry
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |