The way you wrote it, it will always cost either 100 or 200 plat, higher levels won't be able to buy anything. Because if level is 99 $ulevel < 10 will be false and the next check $ulevel > 9 will be true, so it will skip all the other elsifs even though it fails the $ulevel < 20. You need to either combine these into one line as elsif($ulevel > 9 && $ ulevel < 20) or just get rid of the ($ulevel > 9) because if it ever gets to that else their level must be over 9 regardless.
|