SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/06/2015, 06:57 PM   #1
malackovgfx
Little Clucker
 
malackovgfx's Avatar
 
Join Date: Feb 2015
Posts: 24
Reputation: 0
Default Array index out of bounds

FIXED
__________________

Last edited by malackovgfx; 12/06/2015 at 08:47 PM.
malackovgfx is offline   Reply With Quote
Old 12/06/2015, 07:07 PM   #2
[KHK]Khalid
Gangsta
 
[KHK]Khalid's Avatar
 
Join Date: Jan 2012
Location: Alexandria, Egypt
Posts: 854
Reputation: 136
Default Re: Array index out of bounds

Change this

pawn Code:
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 Code:
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
[KHK]Khalid is offline   Reply With Quote
Old 12/06/2015, 07:10 PM   #3
malackovgfx
Little Clucker
 
malackovgfx's Avatar
 
Join Date: Feb 2015
Posts: 24
Reputation: 0
Default Re: Array index out of bounds

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

Off: Kurcina means huge d*ck
__________________
malackovgfx is offline   Reply With Quote
Old 12/06/2015, 07:24 PM   #4
malackovgfx
Little Clucker
 
malackovgfx's Avatar
 
Join Date: Feb 2015
Posts: 24
Reputation: 0
Default Re: Array index out of bounds

No errors now but it dosen't save the car in the database, here's the mysql log
__________________
malackovgfx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
array index out of bounds Pawnify Scripting Help 5 04/10/2014 06:34 PM
[HELP] array index of bounds Luca12 Scripting Help 6 05/06/2014 10:34 AM
Array Index Out of Bounds Zonoya Scripting Help 2 07/03/2014 09:12 PM
[Ajuda] array index out of bounds - wtf? AiaN Português/Portuguese 6 01/12/2012 06:53 AM


All times are GMT. The time now is 02:12 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.