SA-MP Forums Archive
Array index out of bounds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Array index out of bounds (/showthread.php?tid=577603)



Array index out of bounds - malackovgfx - 12.06.2015

FIXED


Re: Array index out of bounds - [KHK]Khalid - 12.06.2015

Change this

pawn Код:
saveCarToDB(playerid,carid)
{
    new query[128];
    format(query, sizeof(query), "INSERT INTO cars (owner,model,x,y,c,r) VALUES ('%i','%i','%f','%f','%f','%f')",iInfo[playerid][id],cInfo[carid][model],iInfo[carid][c_x],iInfo[carid][c_y],iInfo[carid][c_z],iInfo[carid][c_r]);
    mysql_function_query(dbhandel,query,false,"","");
    return 1;
}
to

pawn Код:
saveCarToDB(playerid,carid)
{
    new query[128];
    format(query, sizeof(query), "INSERT INTO cars (owner,model,x,y,c,r) VALUES ('%i','%i','%f','%f','%f','%f')",iInfo[playerid][id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r]);
    mysql_function_query(dbhandel,query,false,"","");
    return 1;
}
Off:
What does "kurcina" mean? :P


Re: Array index out of bounds - malackovgfx - 12.06.2015

Thank you I didn't even notice my typos...

Off: Kurcina means huge d*ck


Re: Array index out of bounds - malackovgfx - 12.06.2015

No errors now but it dosen't save the car in the database, here's the mysql log