does it matter?
|
yeah i want to learn to make codes more cleaner and smaller so basicly make an array i think so for example
how would i make that shorter?Code:if (itemUsed == 1755 && useWith == 1623 || itemUsed == 1623 && useWith == 1755) { if (playerLevel[12] >= 20) { if (System.currentTimeMillis() - lastAction > actionInterval) { actionInterval = 2800; lastAction = System.currentTimeMillis(); setAnimation(888); deleteItem(1623, 1); addItem(1607, 1); addSkillXP(1000, 12); sM("You cut the Sapphire"); } } else { } }
does it matter?
takes up more space and hurts my eyes >.>
Wtf is with the;
Code:} } else { } }
Code:if (itemUsed == 1755 && useWith == 1623 || itemUsed == 1623 && useWith == 1755 && playerLevel[12] >= 20) { if (System.currentTimeMillis() - lastAction > actionInterval) { actionInterval = 2800; lastAction = System.currentTimeMillis(); setAnimation(888); deleteItem(1623, 1); addItem(1607, 1); addSkillXP(1000, 12); sM("You cut the Sapphire"); } }
That would work too.Code:if (itemUsed == 1755 && useWith == 1623 || itemUsed == 1623 && useWith == 1755 && playerLevel[12] >= 20 && System.currentTimeMillis() - lastAction > actionInterval) { actionInterval = 2800; lastAction = System.currentTimeMillis(); setAnimation(888); deleteItem(1623, 1); addItem(1607, 1); addSkillXP(1000, 12); sM("You cut the Sapphire"); }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |