MySQL Update Problem -
BrainDamaged - 10.05.2018
Hi forum sa-mp, how do I update the following codes for r41 ?
Before:
Код:
format(string, sizeof(string), "%s%d\t%s\t%s\t%s\n", string, cache_get_field_content_int(i, "ID"), name, PermissionStates[ cache_get_field_content_int(i, "Can_Deposit") ], PermissionStates[ cache_get_field_content_int(i, "Can_Take") ]);
After:
Код:
format(string, sizeof(string), "%s%d\t%s\t%s\t%s\n", string, cache_get_value_name_int(i, "ID"), name, PermissionStates[ cache_get_value_name_int(i, "Can_Deposit") ], PermissionStates[ cache_get_value_name_int(i, "Can_Take") ]);
,
Error
Код:
error 017: undefined symbol "cache_get_field_content_int"
Re: MySQL Update Problem -
BrainDamaged - 10.05.2018
Up++ (Help expected)
Re: MySQL Update Problem -
Dayrion - 10.05.2018
https://sampwiki.blast.hk/wiki/MySQL/R40...et_value_index I guess
Re: MySQL Update Problem -
BrainDamaged - 10.05.2018
I have studied the subject but could not get a fruitful result, can you help me through the sample
Not: My bad english, sorry
Re: MySQL Update Problem -
FaLLenGirL - 10.05.2018
Quote:
Originally Posted by Dayrion
|
@Dayrion wanted to say from his post that you must update your MySQL plugin.
That's why he gave to you the download link of the
R40 MySQL Version, that version
contains some functions that have been renamed. I see that you already know that. Here's an example:
PHP код:
// you must use the function before,
// it is the same for cache_get_field_content_int
new pName[ 30 ], string[ 500 ];
for( new i = 0; i < Rows; i ++ )
{
cache_get_value_name( i, "Name", pName, 30 );
format( string, sizeof( string ), "%s - Name", pName );
}
Re: MySQL Update Problem -
BrainDamaged - 10.05.2018
Quote:
Originally Posted by FaLLenGirL
@Dayrion wanted to say from his post that you must update your MySQL plugin.
That's why he gave to you the download link of the R40 MySQL Version, that version
contains some functions that have been renamed. I see that you already know that. Here's an example:
PHP код:
// you must use the function before,
// it is the same for cache_get_field_content_int
new pName[ 30 ], string[ 500 ];
for( new i = 0; i < Rows; i ++ )
{
cache_get_value_name( i, "Name", pName, 30 );
format( string, sizeof( string ), "%s - Name", pName );
}
|
I thank you for your help, I am a bit confused about how to change the codes I have given. Could you apply the example above to the codes I threw?
Re: MySQL Update Problem -
FaLLenGirL - 10.05.2018
Do you understand now how ?
PHP код:
new pID, pDep, pTake;
cache_get_value_int( i, "ID", pID );
cache_get_value_int( i, "Can_Deposit", pDep );
cache_get_value_int( i, "Can_Take", pTake );
format( string, sizeof( string ), "%s%d\t%s\t%s\t%s\n", string, pID, name, PermissionStates[ pDep ], PermissionStates[ pTake ] );
* Important here it says (
be more careful with the informations):
Re: MySQL Update Problem -
BrainDamaged - 10.05.2018
Thank you so much ! (Problem Fixed)