14.02.2015, 06:12
Use this -
You will use cache_get_field_content(0,.....)
The first parameter of cache_get_field_content is for row number since row number starts from 0 so it will be 0, if you have more than one rows then you change the value of first parameter to row number.
pawn Code:
cache_get_field_content(0, "Name", temp), bName = strval(temp);
cache_get_field_content(0, "Reason", temp), bReason = strval(temp);
cache_get_field_content(0, "BannedBy", temp), bannedBy = strval(temp);
cache_get_field_content(0, "IP", temp), bIP = strval(temp);
cache_get_field_content(0, "BanID", temp), bID = strval(temp);
cache_get_field_content(0, "Expiration", temp), bExpiration = strval(temp);
/*bName = cache_get_field_content_int(0, "Name");
bReason = cache_get_field_content_int(0, "Reason");
bannedBy = cache_get_field_content_int(0, "BannedBy");
bIP = cache_get_field_content_int(0, "IP");
bID = cache_get_field_content_int(0, "BanID");
bExpiration = cache_get_field_content_int(0, "Expiration");
#pragma unused temp*/
The first parameter of cache_get_field_content is for row number since row number starts from 0 so it will be 0, if you have more than one rows then you change the value of first parameter to row number.