MySQL Update Problem
#1

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"
Reply
#2

Up++ (Help expected)
Reply
#3

https://sampwiki.blast.hk/wiki/MySQL/R40...et_value_index I guess
Reply
#4

I have studied the subject but could not get a fruitful result, can you help me through the sample

Not: My bad english, sorry
Reply
#5

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 pName30 ], string500 ];
for( new 
0Rows++ )
{
    
cache_get_value_namei"Name"pName30 ); 
    
formatstringsizeof( string ), "%s - Name"pName );

Reply
#6

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 pName30 ], string500 ];
for( new 
0Rows++ )
{
    
cache_get_value_namei"Name"pName30 ); 
    
formatstringsizeof( 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?
Reply
#7

Do you understand now how ?

PHP код:
new pIDpDeppTake;
cache_get_value_inti"ID"pID );
cache_get_value_inti"Can_Deposit"pDep );
cache_get_value_inti"Can_Take"pTake );

formatstringsizeof( string ), "%s%d\t%s\t%s\t%s\n"stringpIDnamePermissionStatespDep ], PermissionStatespTake ] ); 
* Important here it says (be more careful with the informations):
Reply
#8

Thank you so much ! (Problem Fixed)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)