11.01.2015, 02:52
Error
Command
I do not know how to use strcat to separate, researched and saw a topic in English that a guy sent the other to use this, but he also did not know how, someone help me?
pawn Код:
error 075: input line too long (after substitutions)
pawn Код:
mysql_format(ConnectMYSQL, query, sizeof(query), "INSERT INTO `houses` (`ID`, `OutPosX`, `OutPosY`, `OutPosZ`, `InPosX`, `InPosY`, `InPosZ`, `World`, `Price`, `Interior`, `Locked`, `Dono`, `FHQ`, `Money`, `Maconha`, `Owner`) VALUES ('%d', '%f', '%f', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d')", HouseInfo[houseid][ID], HouseInfo[houseid][OutPosX], HouseInfo[houseid][OutPosY], HouseInfo[houseid][OutPosZ], HouseInfo[houseid][InPosX], HouseInfo[houseid][InPosY], HouseInfo[houseid][InPosZ], HouseInfo[houseid][World], HouseInfo[houseid][Price], HouseInfo[houseid][Interior], HouseInfo[houseid][Locked], HouseInfo[houseid][Dono], HouseInfo[houseid][FHQ], HouseInfo[houseid][Money], HouseInfo[houseid][Maconha], HouseInfo[houseid][Owner]) ;
pawn Код:
CMD:makehouse(playerid, params[]) {
if(admin[playerid] < 6) return 0;
new houseid, type;
new query[1024];
new string[80];
if(sscanf(params,"ii", houseid, type)) {
SendClientMessage(playerid, -1, "Use: /makehouse [houseid] [type]");
SendClientMessage(playerid, -1, "types: 1-pequena 2-media 3-grande 4-mansгo 5-vip");
return 1;
}
switch( type ) {
case 1: { // Pequena
HouseInfo[houseid][InPosX] = 223.20;
HouseInfo[houseid][InPosY] = 1287.08;
HouseInfo[houseid][InPosZ] = 1082.14;
HouseInfo[houseid][Interior] = 1;
HouseInfo[houseid][Price] = 500000;
}
case 2: { // media
HouseInfo[houseid][InPosX] = 2365.31;
HouseInfo[houseid][InPosY] = -1135.60;
HouseInfo[houseid][InPosZ] = 1050.88;
HouseInfo[houseid][Interior] = 8;
HouseInfo[houseid][Price] = 3000000;
}
case 3: { // grande
HouseInfo[houseid][InPosX] = 446.99;
HouseInfo[houseid][InPosY] = 1397.07;
HouseInfo[houseid][InPosZ] = 1084.30;
HouseInfo[houseid][Interior] = 2;
HouseInfo[houseid][Price] = 10000000;
}
case 4: { // mansгo
HouseInfo[houseid][InPosX] = 2196.85;
HouseInfo[houseid][InPosY] = -1204.25;
HouseInfo[houseid][InPosZ] = 1049.02;
HouseInfo[houseid][Interior] = 6;
HouseInfo[houseid][Price] = 100000000;
}
case 5: { // VIP
HouseInfo[houseid][InPosX] = 140.17;
HouseInfo[houseid][InPosY] = 1366.07;
HouseInfo[houseid][InPosZ] = 1083.65;
HouseInfo[houseid][Interior] = 5;
HouseInfo[houseid][Price] = 3000; // abaixo de 10000 vai ser DP
}
}
HouseInfo[houseid][Owner] = 0;
HouseInfo[houseid][FHQ] = 0;
HouseInfo[houseid][ID] = houseid;
GetPlayerPos(playerid, HouseInfo[houseid][OutPosX], HouseInfo[houseid][OutPosY], HouseInfo[houseid][OutPosZ]);
mysql_format(ConnectMYSQL, query, sizeof(query), "INSERT INTO `houses` (`ID`, `OutPosX`, `OutPosY`, `OutPosZ`, `InPosX`, `InPosY`, `InPosZ`, `World`, `Price`, `Interior`, `Locked`, `Dono`, `FHQ`, `Money`, `Maconha`, `Owner`) VALUES ('%d', '%f', '%f', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d')", HouseInfo[houseid][ID], HouseInfo[houseid][OutPosX], HouseInfo[houseid][OutPosY], HouseInfo[houseid][OutPosZ], HouseInfo[houseid][InPosX], HouseInfo[houseid][InPosY], HouseInfo[houseid][InPosZ], HouseInfo[houseid][World], HouseInfo[houseid][Price], HouseInfo[houseid][Interior], HouseInfo[houseid][Locked], HouseInfo[houseid][Dono], HouseInfo[houseid][FHQ], HouseInfo[houseid][Money], HouseInfo[houseid][Maconha], HouseInfo[houseid][Owner]) ;
format(string, sizeof(string), "%s criou uma nova casa!", PlayerName(playerid) );
SendClientMessage(playerid, COLOR_LIGHTRED, string);
RefreshHouses();
return 1;
}