18.06.2012, 02:10
Well as you guys know, we have to convert all our queries if we want to use the R7 version of Blue-G's MySQL plugin. Well I have 350 queries, converted them all and tested them and found out that nothing loads. The houses, businesses, icons, vehicles...etc...nothing. Here's an example of how I went about loading:
My "Load" function should load the "Name" from the database into the "name" variable, but it didn't. The way I did this was to check if the job exists and if it does, I assign a value of "1" into the "exist[1]" array so I can continue loading but apparently the script forgets the value of the "exist[1]" array.
What am I doing wrong?
The information above is not used in the actual gamemode.
My "Load" function should load the "Name" from the database into the "name" variable, but it didn't. The way I did this was to check if the job exists and if it does, I assign a value of "1" into the "exist[1]" array so I can continue loading but apparently the script forgets the value of the "exist[1]" array.
pawn Код:
stock Load()
{
new name[24];
mysql_function_query(1,"SELECT `Name` FROM `jobs` WHERE `ID` = 1",true,"Loading","i",1);
if(exist[1] == 1)
{
print("Loaded");
cache_get_field_content(0,"Name",name);
}
}
pawn Код:
forward Loading(id);
public Loading(id)
{
cache_get_data(rows,fields);
if(rows)
{
exist[1] = 1;
print("Exists.");
}
else
{
exist[1] = 0;
print("Doesn't exist.");
}
return 1;
}
The information above is not used in the actual gamemode.