Actually both work, and it's not a typo, you made a horribly inefficient script. I really wish you'd just stop helping people until you really understand Pawn, because right now you don't, and you're misleading so many people that way.
Exactly. Couldn't of put it in better words myself ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116
I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.