a_samp.inc 0.3z to 0.3.7 changes
#1

I just use Text Compare to check differences and found this


0.3z:
native GetWeaponName(weaponid, weapon[], len);
native GetPlayerVersion(playerid, version[], len);

0.3.7:
native GetWeaponName(weaponid, const weapon[], len);
native GetPlayerVersion(playerid, const version[], len);

But that should be as stated in wiki "version[] The string to store the player's version in, passed by reference."

what's the meaning of that change
Reply
#2

const modifier makes a variable unchangeable.But the purpose of using const in function parameters is to allow the compiler to make optimizations.

addsiren is self-explanatory.
Reply
#3

Quote:
Originally Posted by Yashas
Посмотреть сообщение
const modifier makes a variable unchangeable.But the purpose of using const in function parameters is to allow the compiler to make optimizations.

addsiren is self-explanatory.
I don't ask anything for addsiren.

but how store the weapon name if the parameter is unchangeable?
native GetWeaponName(weaponid, const weapon[], len);

another example:
0.3.7:
native SetPlayerName(playerid, const name[]); //ok good for SetPlayerName(1,"Miguel"); //"Miguel" is constant
native GetPlayerName(playerid, const name[], len); //what? xd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)