SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 10 of 10
Search took 0.00 seconds.
Search: Posts Made By: JoBullet
Forum: Discussion 15/07/2013, 04:48 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

That's because when printf looks up %f specifier it casts the argument to float which, due to pawn conversion, kept right bit format. The Misiur was essentially right.
Forum: Discussion 14/04/2013, 05:53 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

Today I learned:
You can do stuff like

#tryinclude test"
#tryinclude test>

Also if you try:

#tryinclude a_samp"
#assert defined a_samp"
Forum: Discussion 04/01/2013, 06:49 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

Today I learned you can have (almost) arbitrary placed numeric placeholders(they are skipped while parsing though):
All of these are valid:

0b_10_1
0x_1DEAD
1_3_4_5
1_2.1_e-4

And as a added...
Forum: Discussion 30/07/2012, 11:21 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

Today I learned that pattern name is called prefix. The prefix is the part of pattern that begins at the beginning of the pattern and ends on first occurrence of non-alphabetic character.
Note: in...
Forum: Discussion 30/07/2012, 06:29 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

That's untrue, static variable is a global with a visibility limited to a function within it's declared, and it has nothing to do with efficiency, put it another way:
This code:

new static...
Forum: Discussion 29/07/2012, 10:09 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

Today I learned that there exists a keyword named "defined", its design is very much same as sizeof though its functionality is similar to "#if defined" pre-processor construct. "defined" keyword...
Forum: Discussion 29/07/2012, 09:02 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

Today I learned that only class-specifiers('stock','const','static','public') that cannot mix together are 'public' and 'static', thus following are all correct in any combination(Note: only one...
Forum: Discussion 25/07/2012, 03:03 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

Today I learned that this is how you enforce someone implementing function(not public) to return array of exact size:


forward [128] getMessage(playerid);

stock getMessage(playerid)
{
...
Forum: Discussion 22/07/2012, 05:15 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Re: Today I learned - Share your newly found knowledge!

The '%'(modulus) operator returns remainder of division.
Forum: Discussion 19/07/2012, 06:45 PM
Replies: 709
Views: 165,955
Posted By JoBullet
Respuesta: Today I learned - Share your newly found knowledge!

Today I learned that returning array from function works in such a way that array's address is stored in a following address:
current function frame address + (argcount + 3) * sizeof(cell)
Showing results 1 to 10 of 10

 

All times are GMT. The time now is 04:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.