argument type mismatch =(
#1

Код:
COMMAND:ocreate(playerid,params[])
{
	new id,name[32],query[128];
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "You dont have the permission to do that.");
	if(sscanf(params,"is",id,name)) return SendClientMessage(playerid, red, "USAGE:/ocreate [id]");
	if(!CheckOrgExists(id))//error here pls help
	    {
	    format(query, sizeof(query), "INSERT INTO orgids (ID) VALUES (%d)",id);
	    mysql_query(query);
	    }
	else
	    {
		SendClientMessage(playerid, red, "Org exists use /oname, /ocolour etc. to edit");
		}
	return 1;
}
 	
CheckOrgExists(id[])
{
	new string[128];
	format(string, sizeof(string), "SELECT * FROM orgids WHERE ID=%d", id);
	mysql_query(string);
	mysql_store_result();
	new value;
	value = mysql_num_rows();
	mysql_free_result();
	return value;
}
Reply
#2

show us the line
Reply
#3

I would sat the problem is this
pawn Код:
CheckOrgExists(id[])
id is not a string.
Reply
#4

thanks rachel. fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)