shoXy Posted November 5, 2012 Share Posted November 5, 2012 Hey guys, i tried to save the recently bought vehicle in my MySQL Database, but it doesnt work. local c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12 = getVehicleColor(kauffahrzeug, true) local l1, l2, l3 = getVehicleHeadLightColor (kauffahrzeug) local leerwert = 0 local v1, v2 = getVehicleVariant (kauffahrzeug) --mysql_query(handler, "UPDATE servercore SET WERT = '"..new_key.."' WHERE NAME = 'FREIERCARKEY';") outputChatBox(leerwert) mysql_query(handler, "INSERT INTO fahrzeuge (`CARKEY`, `BESITZER`, `MODEL`, `COLOR1`, `COLOR2`, `COLOR3`, `COLOR4`, `COLOR5`, `COLOR6`, `COLOR7`, `COLOR8`, `COLOR9`, `COLOR10`, `COLOR11`, `COLOR12`, `TANK`, `KILOMETERSTAND`, `UG0`, `UG1`, `UG2`, `UG3`, `UG4`, `UG5`, `UG6`, `UG7`, `UG8`, `UG9`, `UG10`, `UG11`, `UG12`, `UG13`, `UG14`, `UG15`, `UG16`, `LICHTR`, `LICHTG`, `LICHTB`, `FRAKTION`, `JOB`, `KENNZEICHEN`, `VARIANTE`, `LOCX`, `LOCY`, `LOCZ`, `ROTX`, `ROTY`, `ROTZ`) VALUES (NULL, '"..getPlayerName(besitzer).."', '"..model.."', '"..c1.."', '"..c2.."', '"..c3.."', '"..c4.."', '"..c5.."', '"..c6.."', '"..c7.."', '"..c8.."', '"..c9.."', '"..c10.."', '"..c11.."', '"..c12.."', '"..getElementData(kauffahrzeug, "Tank").."', '"..getElementData(kauffahrzeug, "Kilometer").."', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '"..l1.."', '"..l2.."', '"..l3.."', '0', '0', '"..getElementData(kauffahrzeug, "Kennzeichen").."', '0', NULL, '"..x.."', '"..y.."', '"..z.."', '"..rot.."', '0', '0');") If i cut the code to: local c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12 = getVehicleColor(kauffahrzeug, true) local l1, l2, l3 = getVehicleHeadLightColor (kauffahrzeug) local leerwert = 0 local v1, v2 = getVehicleVariant (kauffahrzeug) --mysql_query(handler, "UPDATE servercore SET WERT = '"..new_key.."' WHERE NAME = 'FREIERCARKEY';") outputChatBox(leerwert) mysql_query(handler, "INSERT INTO fahrzeuge (`CARKEY`, `BESITZER`, `MODEL`, `COLOR1`, `COLOR2`, `COLOR3`, `COLOR4`, `COLOR5`, `COLOR6`, `COLOR7`, `COLOR8`, `COLOR9`, `COLOR10`, `COLOR11`, `COLOR12`, `TANK`, `KILOMETERSTAND`, ) VALUES (NULL, '"..getPlayerName(besitzer).."', '"..model.."', '"..c1.."', '"..c2.."', '"..c3.."', '"..c4.."', '"..c5.."', '"..c6.."', '"..c7.."', '"..c8.."', '"..c9.."', '"..c10.."', '"..c11.."', '"..c12.."', '"..getElementData(kauffahrzeug, "Tank").."', '"..getElementData(kauffahrzeug, "Kilometer").."');") It works and the script creates a new record for this car, but if i add the UG-Variables (defined as 0) the new record is not added. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now