- 0
/createhouse mysql
-
Similar Content
-
- 0 answers
- 105 views
-
- 2 replies
- 183 views
-
- 11 replies
- 6,009 views
-
- 1 reply
- 909 views
-
- 37 replies
- 6,036 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
TzAkS
[pawn]if(strcmp(cmd, "/createhouse", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new Int = 1;
new Owner[256], Discription[256];
format(Owner, sizeof(Owner), "The State");
format(Discription, sizeof(Discription), "House Apartment");
new Value = 45000;
new Lock = 1;
new Owned = 0;
new World = 1;
new Query[256];
new x1 = 244.411987;
new y1 = 305.032990;
new z1 = 999.231995;
new id;
id = mysql_num_rows()+1;
format(Query, sizeof(Query), "INSERT INTO `house` (`ID`, `Entrancex`, `Entrancey`, `Entrancez`, `Exitx`, `Exity`, `Exitz`, `Owner`, `Discription`, `Value`, `Int`, `Lock`, `Owned`, `World`) VALUES ('%d', '%f', '%f', '%f', '%f', '%f', '%f', '%s', '%s', '%d', '%d', '%d', '%d', '%d')", id, X,Y,Z,x1,y1,z1,Owner,Discription,Value,Int,Lock,Owned,World);
mysql_query(Query);
mysql_free_result();
return 1;
}
return 1;
}
[/pawn]
Scriu comanda pe server si nu imi pune casa in baza de date.
[pawn][16:48:53] CMySQLHandler::Query(INSERT INTO `house` (`ID`, `Entrancex`, `Entrancey`, `Entrancez`, `Exitx`, `Exity`, `Exitz`, `Owner`, `Discription`, `Value`, `Int`, `Lock`, `Owned`, `World`) VALUES ('0', '933.725830', '-1804.942138', '13.844137', '244.411987', '305.032989', '999.231994') - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1)
[16:48:53] >> mysql_free_result( Connection handle: 1 )
[16:48:53] CMySQLHandler::FreeResult() - The result is already empty.[/pawn]
Link to comment
Share on other sites
0 answers to this question
Recommended Posts