27.08.2014, 21:04
(
Последний раз редактировалось Catalyst-; 28.08.2014 в 23:07.
)
I've been stuck with this for a while and it's bugging me. I'm unable to figure out the correct way to pass an array to a MySQL callback after the query is complete.
This is my attempt:
Query:
Callback:
Output:
The output will be correct if I change the array to (remove '0'):
However, it will wrap back to 0 if I use a value higher than 255.
Hope someone can see what I'm doing wrong and help me out, thanks!
- Using BlueG's MySQL plugin (R7)
This is my attempt:
Query:
pawn Код:
new array[5] = {0,1,2,3,4};
mysql_function_query(1, "SELECT * FROM `table` WHERE `id` = 1", false, "Test", "s", array);
pawn Код:
forward Test(array[]);
public Test(array[])
{
for(new i = 0; i != 5; i++)
printf("array[%d] = %d", i, array[i]);
}
pawn Код:
array[0] = 0
array[1] = 0
array[2] = 0
array[3] = 0
array[4] = 0
pawn Код:
new array[5] = {1,1,2,3,4};
Hope someone can see what I'm doing wrong and help me out, thanks!
- Using BlueG's MySQL plugin (R7)