- Регистрация
- 20 Дек 2015
- Сообщения
- 242
- Лучшие ответы
- 0
- Репутация
- -10
HElp!
HTML:
[14:46:00] [WARNING] CMySQLResult::GetRowDataByName - field not found ("pReferalRang")
[14:46:00] [ERROR] cache_get_field_content_int - invalid datatype
HTML:
publics: DrugSystem(playerid)
{
new rows,fields;
cache_get_data(rows,fields,connects);
if(rows)
{
string[0]=EOS;
new ReferalCount = cache_get_field_content_int(0, "pReferalCount", connects);
ReferalCount++;
switch(ReferalCount)
{
case 5:
{
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pReferalRang` = '1' WHERE `Name` = '%e'", PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
}
case 6..10:
{
if(ReferalCount == 10)
{
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pReferalRang` = '2' WHERE `Name` = '%e'", PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
}
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pRubDon` = `pRubDon` + '125' WHERE `Name` = '%e'", PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
PlayerInfo[playerid][pRubInfo] += 25;
UpdatePlayerData(playerid, "pRubDon", PlayerInfo[playerid][pRubInfo]);
}
case 11..15:
{
if(ReferalCount == 15)
{
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pReferalRang` = '3' WHERE `Name` = '%e'", PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
}
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pRubDon` = `pRubDon` + '150' WHERE `Name` = '%e'", PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
PlayerInfo[playerid][pRubInfo] += 50;
UpdatePlayerData(playerid, "pRubDon", PlayerInfo[playerid][pRubInfo]);
}
default:
{
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pRubDon` = `pRubDon` + '200' WHERE `Name` = '%e'", PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
PlayerInfo[playerid][pRubInfo] += 100;
UpdatePlayerData(playerid, "pRubDon", PlayerInfo[playerid][pRubInfo]);
}
}
mysql_format(connects, string, 128, "UPDATE `accounts` SET `pReferalCount` = '%i' WHERE `Name` = '%e'", ReferalCount, PlayerInfo[playerid][pDrug]);
mysql_empty(connects, string);
}
else return 1;
return 1;
}