View Single Post
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 08-20-2009 , 18:12   Re: Pawn Picture Tutorial
Reply With Quote #22

Quote:
Originally Posted by Hawk552 View Post
This is incorrect. Pawn bools can store other values as can Floats. The tags are just that, tags. I don't believe in the idea of misleading beginners to make things more simple to understand. I think you should explain this properly.
Personally I think it is okay to simplify it for beginners. It is not that important, but important enough to get a basic understanding of it. If I can think of a way to describe it, I will add it in eventually.

Quote:
Originally Posted by Hawk552 View Post
This is bad practice and you should avoid it not only in Pawn but also in other languages. It is always better to use the proper escape character. In this case, it is '^0', which the ASCII code for is 0. This will also give you an excuse to talk about escape characters, which you did not cover.
I changed it, but I have not created a section on escape characters yet.

Quote:
Originally Posted by Hawk552 View Post
Pawn functions always return something. Even if no return is explicitly stated in a function, it will return 0.
It was mentioned else where, I added it there also though.

Quote:
Originally Posted by Hawk552 View Post
There's no real problem here. I would just suggest that you say that some forwards will ignore their return value (i.e. plugin_init()).
Added.

Quote:
Originally Posted by Hawk552 View Post
Functions which have multiforwards hooked to them get called whether or not they are declared as forwards. The only real purpose of forwards is for documentation. There may be something else I don't know about, though.
Either way, I think it is better for people to know which forwards are being called and not to just expect them.

Quote:
Originally Posted by Hawk552 View Post
Terrible variable naming. Please do not encourage people to write code like this.
Didn't mean to. Fixed.

Quote:
Originally Posted by Hawk552 View Post
I'm very uncertain about both this and my following comment. I'm pretty sure that mp3s have to be precached using precache_generic(). I'm also pretty sure that only wav files can be precached using precache_sound(). I could be wrong, though. Don't hold me to that. I just suggest you look into it.
Haven't had time still; if someone else finds out, let me know and I'll add/change what it says.

Quote:
Originally Posted by Hawk552 View Post
You should clarify that a default case is not required.
Added.

Quote:
Originally Posted by Hawk552 View Post
This is completely wrong. The compiler ignores lines while parsing this. For example, this would compile fine and in the way you would intend it to:
Fixed.


Quote:
Originally Posted by Hawk552 View Post
This is a terrible style as well and you should not be encouraging people to use it. If you have to, for some God-forsaken reason, leave your curly braces on the same line as the opening statement, at least add a space between them.
I actually agreed with you on this one. I prefer the curly brackets on the line after, but I seemed to be using that style more in my scripts. Anyway, it carried over into the tutorial. Fixed.

Quote:
Originally Posted by Hawk552 View Post
You should clarify the difference between pre/post incrementing/decrementing.
IIRC, I saw a problem with pre incrementing/decrementing somewhere, so I would rather not have people doing it since I am not even sure about it.

Quote:
Originally Posted by minimiller
Those are some funny looking "Square brackets" ;)
Fixed.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`