Differences with {} - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Differences with {} (
/showthread.php?tid=420421)
Differences with {} -
Activest - 04.03.2013
Hey
Someone can tell me what are the differences between:
pawn Код:
new name[24];
new name[24] = {0,...};
GetPlayerName...
Re: Differences with {} -
Supera - 04.03.2013
All cells of the name [24] = {0, ...} does not have the number 0.
name [24], will have a null value
Re: Differences with {} -
Activest - 04.03.2013
English please
Edit
Okay how can is this help me?
Re: Differences with {} -
Supera - 04.03.2013
Suppose you want to turn all the cells name [24]; 0.
You could do the following:
name [0] = 0;
name [1] = 0;
name [2] = 0;
name [3] = 0;
continue ...
name [23] = 0;
This way would take longer and would be very large.
One way would be to make more optimized as follows:
name [24] = {0, ...}; What does the same as the previous example