public OnRumahLoad()
{
new num_rows,num_fields;
cache_get_data(num_rows,num_fields,mysqlku);
if(!num_rows) return 1;
for(new i=0; i<num_rows; i++)
{
new id = getRumahID();
rInfo[id][r_x] = cache_get_field_content_float(i,"r_x",mysqlku);
rInfo[id][r_y] = cache_get_field_content_float(i,"r_y",mysqlku);
rInfo[id][r_z] = cache_get_field_content_float(i,"r_z",mysqlku);
rInfo[id][ir_x] = cache_get_field_content_float(i,"ir_x",mysqlku);
rInfo[id][ir_y] = cache_get_field_content_float(i,"ir_y",mysqlku);
rInfo[id][ir_z] = cache_get_field_content_float(i,"ir_z",mysqlku);
rInfo[id][r_interior] = cache_get_field_content_int(i,"r_interior",mysqlku);
cache_get_field_content(i,"pemilik",rInfo[id][r_pemilik],mysqlku);
rInfo[id][r_id] = cache_get_field_content_int(i,"id",mysqlku);
}
return 1;
}
D:\data aji\Samp server\gamemodes\tes.pwn(168) : warning 219: local variable "id" shadows a variable at a preceding level D:\data aji\Samp server\gamemodes\tes.pwn(169) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(170) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(171) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(172) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(173) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(174) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(175) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(176) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(177) : warning 213: tag mismatch D:\data aji\Samp server\gamemodes\tes.pwn(168) : warning 204: symbol is assigned a value that is never used: "id" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Warnings.
new Float:example = cache_get_field_content_float (row, const field_name[], connectionHandle = 1)
You've already created a variable with the value "id", so the script will not detect the previous value you've created if you replace it for your new one, assuming you require the original for the execution of the code below but nevertheless, you should rename the variable created.
The output of cache_get_field_content_float has to be stored as a float such as the following: Код:
new Float:example = cache_get_field_content_float (row, const field_name[], connectionHandle = 1) |