Please delete this post
--Edited--
|
Thats true. They are two dimensional arrays. Strings in Pawn ARE arrays and can be treated as such.
|
--Edited--
|
if you do not index an array and you try and call it. (new myArr[3][2]) and you try and call myArr[4] it will give you an error.
|
--Edited--
|
that is exactly how it is except for it has pName[0][7] = '^0' //string terminator.
|
--Edited--
|
No because it wouldnt work. You need to have the other deminsion.
And the ^ (carot) is the escape character in Pawn, much like the \ character for other languages. examples: ^n == \n ^0 == \0 == NULL ^" == \" ^' == \' ^^ == \\ |
--Edited--
|
well, it does just use that. The reason for pName[33][32] is it uses one name for each player.
so if there were three people in the server with ids 1 , 2 , and 3 with names Jeff , Bob , and Jack it would be set up as follows pName[1][0] = 'J' pName[1][1] = 'e' pName[1][2] = 'f' pName[1][3] = 'f' pName[1][4] = '^0' pName[2][0] = 'B' pName[2][1] = 'o' pName[2][2] = 'b' pName[2][3] = '^0' pName[3][0] = 'J' pName[3][1] = 'a' pName[3][2] = 'c' pName[3][3] = 'k' pName[3][4] = '^0' If you were just storing one name it would be pName[32] and would store as you are asking pName[0] = 'J' pName[1] = 'e' pName[2] = 'f' pName[3] = 'f' pName[4] = '^0' Oh and cmd_target() returns a players id (a number) by using a name or authid or #userid |
| All times are GMT -4. The time now is 16:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.