we had a guy without steam ID stored in here. caused the python part to crash
This commit is contained in:
parent
075d0beaca
commit
cbb9cc5817
@ -64,10 +64,16 @@ public void write_reward_entry(int client, char[] event_map)
|
|||||||
g_hDatabase.Escape(sName, sEscapedName, size2 + 1);
|
g_hDatabase.Escape(sName, sEscapedName, size2 + 1);
|
||||||
|
|
||||||
char SID[64];
|
char SID[64];
|
||||||
GetClientAuthId(client, AuthId_Steam2, SID, sizeof(SID));
|
if (GetClientAuthId(client, AuthId_Steam2, SID, sizeof(SID)))
|
||||||
Format(sQuery, sizeof(sQuery), "INSERT INTO `rewards` (`steamid`, `username`, `event_map`, `event_reward_days`, `admin_created_reward_steamid`, `admin_created_reward_name`) VALUES ('%s', '%s', '%s', '%i', '%s', '%s')", SID, sEscapedName, event_map, g_ireward_days, g_cadmin_sid, g_cadmin_escaped_name);
|
{
|
||||||
g_hDatabase.Query(DummyCallback, sQuery, DBPrio_Normal);
|
Format(sQuery, sizeof(sQuery), "INSERT INTO `rewards` (`steamid`, `username`, `event_map`, `event_reward_days`, `admin_created_reward_steamid`, `admin_created_reward_name`) VALUES ('%s', '%s', '%s', '%i', '%s', '%s')", SID, sEscapedName, event_map, g_ireward_days, g_cadmin_sid, g_cadmin_escaped_name);
|
||||||
PrintToChat(client, "Your %i days VIP were stored for winning this round. They will be awarded in the next 2-3 hours if you have a forum account.", g_ireward_days);
|
g_hDatabase.Query(DummyCallback, sQuery, DBPrio_Normal);
|
||||||
|
PrintToChat(client, "Your %i days VIP were stored for winning this round. They will be awarded in the next 2-3 hours if you have a forum account.", g_ireward_days);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PrintToChat(client, "So sorry but your steam ID is not working. no vip for you.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DummyCallback(Handle hOwner, Handle hChild, const char[] err, any data)
|
public void DummyCallback(Handle hOwner, Handle hChild, const char[] err, any data)
|
||||||
|
Loading…
Reference in New Issue
Block a user