Quote:
|
Originally Posted by excaliber7388
[code]
if(playerchats&&strequals(#c,bell)){
if(hasweapon(Psy system)){
setsword swordc-reverseblade.png,5;
playerswordpower = 5;
triggeraction x,y,sword,psy;
}
}
if(playerchats&&strequals(#c,bell)){
if(hasweapon(Warrior system)){
setsword swordc-reverseblade.png,6;
playerswordpower = 6;
triggeraction x,y,sword,war;
}
}[CODE]
|
Erm, you need to learn how to group your code together better :|
PHP Code:
if(playerchats) {
if(strequals(#c,bell)) {
if(hasweapon(Warrior system)) {
// ..
} else if(hasweapon(Psy system)) {
// ..
}
}
}
Or something along those lines. In your version, if they have both weapons, both blocks of code are being called, and that is inefficient and stupid.