Copy strings id
PHP Code:
set and rem2 and the result: Code:
** ****Another question, How is the best method to reset the strings value ? PHP Code:
|
Re: Copy strings id
%s should match with string[id] and not string
PHP Code:
|
Re: Copy strings id
Ohh, My mistake. Thanks for reply.
Another question, How is the best method to reset the strings ( set to zero value or "" ) ? PHP Code:
|
Re: Copy strings id
Second. You can use also EOS ( End Of String, it contains 0 also ). string[ 0 ] = EOS, more readable.
|
Re: Copy strings id
Thanks.
|
Re: Copy strings id
Sorry for double post, but I need help again.
How to use string for 3d array, like: PHP Code:
Sorry I have some problem with my PC and I can not test on server. |
Re: Copy strings id
Wouldn't it be more readable to use 2 vars ?
new string1[33][32] new string2[33][32] ? Else i would do : new string[33][2][32] and not new string[33][32][2] Then : get_user_name(id, string[id][0], charsmax(string[][]) get_user_authid(id, string[id][1], charsmax(string[][]) string[id][0][0] = 0 string[id][0][1] = 0 Else you can also considerate to create a structure, depending on what you are doing. Not sure following code is fine, i usually correct such code when i try to compile : enum _:m_Datas { m_szName[32], m_szAuthid[32] } new g_mPlayersDatas[33][m_Datas] // note that it is same result as new string[33][2][32] i do before get_user_name(id, g_mPlayersDatas[id][m_szName], charsmax(g_mPlayersDatas[][m_szName])) get_user_authid(id, g_mPlayersDatas[id][m_szAuthid], charsmax(g_mPlayersDatas[][m_szAuthid])) g_mPlayersDatas[id][m_szName][0] = 0 g_mPlayersDatas[id][m_szAuthid][0] = 0 |
Re: Copy strings id
Thank you Connor :mrgreen:. I solved my problem :wink:.
|
| All times are GMT -4. The time now is 14:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.