Warnings!! -
VladimirMark - 14.06.2014
I got these warnings.
Код:
f\business.pwn(2084) : warning 217: loose indentation
f\business.pwn(2085) : warning 217: loose indentation
f\business.pwn(2086) : warning 217: loose indentation
f\business.pwn(2087) : warning 217: loose indentation
f\business.pwn(2088) : warning 217: loose indentation
f\business.pwn(2181) : warning 217: loose indentation
And I got these lines from 2081-2090
pawn Код:
new numitems;
if(total != 0)
{
CheckNumberedItem("Vehicle Lock Picks","VehLockpicks")
CheckNumberedItem("Vehicle Tracer","VehTracers")
CheckNumberedItem("Cigars","Cigars")
CheckNumberedItem("Fertilizer","NumFertilizer")
CheckNumberedItem("Gas Can","GasCans")
format(tempstr,sizeof(tempstr),"Congratulations, you now own %s %s",getNumberString(numitems) ,Buyable24Items[itemid][EBIDisplayName]);
}
Re: Warnings!! -
MacT - 14.06.2014
You need add all you function to correctly
pawn Код:
new numitems;
if(total != 0)
{
CheckNumberedItem("Vehicle Lock Picks","VehLockpicks")
CheckNumberedItem("Vehicle Tracer","VehTracers")
CheckNumberedItem("Cigars","Cigars")
CheckNumberedItem("Fertilizer","NumFertilizer")
CheckNumberedItem("Gas Can","GasCans")
format(tempstr,sizeof(tempstr),"Congratulations, you now own %s %s",getNumberString(numitems) ,Buyable24Items[itemid][EBIDisplayName]);
}
Re: Warnings!! -
iZN - 14.06.2014
That's one of the common error among all errors. This is due to the indentation, the spacing, use TAB and SHIFT + TAB to reverse TAB and make it properly indent. ****** about it for more information.
Also, CheckNumberedItem(x, x) <-- needs
;
Re: Warnings!! -
NewerthRoleplay - 14.06.2014
In future search to see if your question has been asked already,
http://lmgtfy.com/?q=warning+217%3A+...orum.sa-mp.com
Re: Warnings!! -
VladimirMark - 14.06.2014
I really thank you all. REP+
EDIT:
I got some other warning but I don't know how to fix them.
Код:
f\sqlqueries.pwn(474) : warning 202: number of arguments does not match definition
f\sqlqueries.pwn(474) : warning 202: number of arguments does not match definition
f\sqlqueries.pwn(525) : warning 202: number of arguments does not match definition
f\sqlqueries.pwn(525) : warning 202: number of arguments does not match definition
f\sqlqueries.pwn(578) : warning 202: number of arguments does not match definition
f\sqlqueries.pwn(578) : warning 202: number of arguments does not match definition
Line 577-581:
pawn Код:
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Teacher's List:", 0, 128);
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
In the other lines it's like the same code but with other name in SendClientMessage Line where the "" are
Re: Warnings!! -
tandytanz - 14.06.2014
Show me lines at 474 until 578
Re: Warnings!! -
VladimirMark - 14.06.2014
Here are lines 473 until 588:
pawn Код:
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Admin List:", 0, 128);
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
{
for(new x=0;x<columns;x++)
{
cache_get_row(i,x,rowname, connhandle);
format(tmsg, sizeof(tmsg), "%s ", rowname);
strcat(msg, tmsg, sizeof(msg));
}
//strcat(msg, "|", sizeof(msg));
SendSplitClientMessage(playerid, COLOR_LIGHTBLUE, msg, 0, 128);
msg[0] = 0;
}
strcat(msg, "|", sizeof(msg));
//format(msg, sizeof(msg), "* %d rows returned, %d columns",rows,columns);
//SendClientMessage(playerid, COLOR_GREEN, msg);
return 1;
}
public OnSQLQueryHelper(playerid) {
new rows, columns;
new connhandle = playerConnectHandle[playerid];
if(connhandle == -1) {
connhandle = g_mysql_handle;
}
new msg[512],rowname[64], tmsg[128];
cache_get_data(rows, columns, connhandle);
if(columns == 0) {
new num = mysql_affected_rows(connhandle);
new insert_id = mysql_insert_id();
if(num != 0 || insert_id == 0) {
format(msg, sizeof(msg), "* %d rows affected.",num);
} else {
format(msg, sizeof(msg), "* Last Insert ID: %d",insert_id);
}
SendClientMessage(playerid, X11_TOMATO_2, msg);
return 1;
}
if(rows == 0) {
SendClientMessage(playerid, X11_TOMATO_2, "No results returned.");
return 1;
}
for(new i=0;i<columns;i++)
{
cache_get_field(i,rowname, connhandle);
format(tmsg, sizeof(tmsg), "|%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Helper's List:", 0, 128);
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
{
for(new x=0;x<columns;x++)
{
cache_get_row(i,x,rowname, connhandle);
format(tmsg, sizeof(tmsg), "%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
//strcat(msg, "|", sizeof(msg));
SendSplitClientMessage(playerid, COLOR_LIGHTBLUE, msg, 0, 128);
msg[0] = 0;
}
strcat(msg, "|", sizeof(msg));
mysql_function_query(connhandle, "SELECT `username` FROM `accounts` WHERE `newbrank` >= 2", true, "OnSQLQueryTeacher", "d",playerid);
//format(msg, sizeof(msg), "* %d rows returned, %d columns",rows,columns);
//SendClientMessage(playerid, COLOR_GREEN, msg);
return 1;
}
forward OnSQLQueryTeacher(playerid);
public OnSQLQueryTeacher(playerid) {
new rows, columns;
new connhandle = playerConnectHandle[playerid];
if(connhandle == -1) {
connhandle = g_mysql_handle;
}
new msg[512],rowname[64], tmsg[128];
cache_get_data(rows, columns, connhandle);
if(columns == 0) {
new num = mysql_affected_rows(connhandle);
new insert_id = mysql_insert_id();
if(num != 0 || insert_id == 0) {
format(msg, sizeof(msg), "* %d rows affected.",num);
} else {
format(msg, sizeof(msg), "* Last Insert ID: %d",insert_id);
}
SendClientMessage(playerid, X11_TOMATO_2, msg);
return 1;
}
if(rows == 0) {
SendClientMessage(playerid, X11_TOMATO_2, "No results returned.");
return 1;
}
for(new i=0;i<columns;i++)
{
cache_get_field(i,rowname, connhandle);
format(tmsg, sizeof(tmsg), "|%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Teacher's List:", 0, 128);
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
{
for(new x=0;x<columns;x++)
{
cache_get_row(i,x,rowname, connhandle);
format(tmsg, sizeof(tmsg), "%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
Re: Warnings!! -
tandytanz - 14.06.2014
SendClientMessage(playerid, color, const message[]);
That's not SendClientMessage(playerid, color, const message[], var, string);
pawn Код:
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Admin List:");
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
{
for(new x=0;x<columns;x++)
{
cache_get_row(i,x,rowname, connhandle);
format(tmsg, sizeof(tmsg), "%s ", rowname);
strcat(msg, tmsg, sizeof(msg));
}
//strcat(msg, "|", sizeof(msg));
SendSplitClientMessage(playerid, COLOR_LIGHTBLUE, msg, 0, 128);
msg[0] = 0;
}
strcat(msg, "|", sizeof(msg));
//format(msg, sizeof(msg), "* %d rows returned, %d columns",rows,columns);
//SendClientMessage(playerid, COLOR_GREEN, msg);
return 1;
}
public OnSQLQueryHelper(playerid) {
new rows, columns;
new connhandle = playerConnectHandle[playerid];
if(connhandle == -1) {
connhandle = g_mysql_handle;
}
new msg[512],rowname[64], tmsg[128];
cache_get_data(rows, columns, connhandle);
if(columns == 0) {
new num = mysql_affected_rows(connhandle);
new insert_id = mysql_insert_id();
if(num != 0 || insert_id == 0) {
format(msg, sizeof(msg), "* %d rows affected.",num);
} else {
format(msg, sizeof(msg), "* Last Insert ID: %d",insert_id);
}
SendClientMessage(playerid, X11_TOMATO_2, msg);
return 1;
}
if(rows == 0) {
SendClientMessage(playerid, X11_TOMATO_2, "No results returned.");
return 1;
}
for(new i=0;i<columns;i++)
{
cache_get_field(i,rowname, connhandle);
format(tmsg, sizeof(tmsg), "|%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Helper's List:");
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
{
for(new x=0;x<columns;x++)
{
cache_get_row(i,x,rowname, connhandle);
format(tmsg, sizeof(tmsg), "%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
//strcat(msg, "|", sizeof(msg));
SendSplitClientMessage(playerid, COLOR_LIGHTBLUE, msg, 0, 128);
msg[0] = 0;
}
strcat(msg, "|", sizeof(msg));
mysql_function_query(connhandle, "SELECT `username` FROM `accounts` WHERE `newbrank` >= 2", true, "OnSQLQueryTeacher", "d",playerid);
//format(msg, sizeof(msg), "* %d rows returned, %d columns",rows,columns);
//SendClientMessage(playerid, COLOR_GREEN, msg);
return 1;
}
forward OnSQLQueryTeacher(playerid);
public OnSQLQueryTeacher(playerid) {
new rows, columns;
new connhandle = playerConnectHandle[playerid];
if(connhandle == -1) {
connhandle = g_mysql_handle;
}
new msg[512],rowname[64], tmsg[128];
cache_get_data(rows, columns, connhandle);
if(columns == 0) {
new num = mysql_affected_rows(connhandle);
new insert_id = mysql_insert_id();
if(num != 0 || insert_id == 0) {
format(msg, sizeof(msg), "* %d rows affected.",num);
} else {
format(msg, sizeof(msg), "* Last Insert ID: %d",insert_id);
}
SendClientMessage(playerid, X11_TOMATO_2, msg);
return 1;
}
if(rows == 0) {
SendClientMessage(playerid, X11_TOMATO_2, "No results returned.");
return 1;
}
for(new i=0;i<columns;i++)
{
cache_get_field(i,rowname, connhandle);
format(tmsg, sizeof(tmsg), "|%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
strcat(msg, "|", sizeof(msg));
SendClientMessage(playerid, COLOR_YELLOW, "Teacher's List:");
//SendSplitClientMessage(playerid, COLOR_GREEN, msg, 0, 128);
msg[0] = 0;
for(new i=0;i<rows;i++)
{
for(new x=0;x<columns;x++)
{
cache_get_row(i,x,rowname, connhandle);
format(tmsg, sizeof(tmsg), "%s", rowname);
strcat(msg, tmsg, sizeof(msg));
}
Re: Warnings!! -
VladimirMark - 14.06.2014
Yea but if I do it this way when an Admin List is sent to a player it will only say "Admin List:" it wont be like Example. "Admin List: George_Johnson" bla bla
Correct me If I'm wrong.
Re: Warnings!! -
tandytanz - 14.06.2014
Nope test it before dude.