14.02.2017, 12:25
Код:
public OnAccountRegister(playerid) { IsLoggedIn[playerid] = 1; pData[playerid][pID] = cache_insert_id(); //loads the ID of the player in the variable once they registered. printf("New account registered. ID: %d", pData[playerid][pID]); //just for debugging. SetPlayerCash(playerid, 50000); pData[playerid][pRegularPlayer] = cache_get_field_content_int(0, "RegularPlayer"); GivePlayerMoney(playerid, 50000); SetPlayerScore(playerid, 0); SetPlayerWantedLevelEx(playerid, 0); TogglePlayerSpectating(playerid, 0); TextDrawShowForPlayer(playerid, RULEBOX); TextDrawShowForPlayer(playerid, rule1); TextDrawShowForPlayer(playerid, rule2); SendClientMessage(playerid, GREEN, "You have successfully registered your account"); SendClientMessage(playerid, COLOR_CYAN, "You are starting a new life! Type /help, /commands for help"); return 1; }
Код:
[08:16:52] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution [08:16:52] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (error #1364) Field 'RegularPlayer' doesn't have a default value [08:16:52] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - error will be triggered in OnQueryError