0 AbsolutePower Posted March 28, 2021 Posted March 28, 2021 (edited) 1 hour ago, Equi93 said: can you help me fix this? its bad coded , update the sql connection and at least replace the player loop with : L2World.getInstance().getPlayer(playerName) instead of a whole loop inside another loop. it can be done like : L2PcInstance player = L2World.getInstance().getPlayer(playerName); if(player != null && player.isOnline() == 1) { add item etc. } final code : if(id > 0 && count > 0 && !playername.isEmpty()) { L2PcInstance player = L2World.getInstance().getPlayer(playerName); if(player != null && player.isOnline() == 1) { your code to add item here. } } Edited March 28, 2021 by AbsolutePower
Question
Equi93
2 answers to this question
Recommended Posts