Wenn ich eine neue BIZ erstelle kommt dieser Fehler beim Server.exe ====
21:30:49] Error-ID: 1062 | Error: Duplicate entry '2' for key 'PRIMARY' | Callback: | Query: INSERT INTO biz (id,name,besitzer,x,y,z,kostet) VALUES (2,'Stadthalle','Niemand',1826.846679,-1301.925659,82.132812,1)
newbiz
if(strcmp(cmd, "/newbiz23", true) == 0) {
if(PlayerInfo[playerid][ALevel] == 1){
SendClientMessage(playerid, COLOR_GREEN, "Du bist nicht befugt!");
return 1;
}
if(IsPlayerAdmin(playerid)){
if(PlayerInfo[playerid][ALevel] == 0) {
MeldungText(playerid, "Du bist nicht befugt!!", 5);
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
MeldungText(playerid, "Verwendung: /newbiz [Kosten] [Name]", 6);
return 1;
}
new player1;
player1 = strval(tmp);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')){
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))){
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
tmp = strtok(cmdtext, idx);
ladebize++;
new Float: spx, Float: spy, Float: spz;
GetPlayerPos(playerid, spx, spy,spz);
new sql[128];
format(sql, sizeof(sql), "INSERT INTO biz (id,name,besitzer,x,y,z,kostet) VALUES (%d,'%s','Niemand',%f,%f,%f,%d)",ladebize,result,spx,spy,spz,player1);
mysql_query(sql);
}
return 1;
}