Please, help...
#1

Hello,

i have this really weird problem, everytime i run my server it crashes, and no error comes up.
The script is from Sin City, so it's MySQL.

Код:
public LoadGroupPermissions(groupid)
{
	new resultline[1024];
	new permission[2][64];
	new query[256];
	
	ConnectToDatabase();
	
	//if(gGroups[groupid][gSQLId]) return 0;
	printf("Loading Group %d Permissions...",groupid);
	format(query, sizeof(query), "SELECT id,permissionid FROM groups_permissions WHERE groupid = %d",groupid);
	printf(" SQL: %s",query);
	samp_mysql_query(query);
	samp_mysql_store_result();
	

	new permissioncount;
	while(samp_mysql_fetch_row(resultline)==1)
	{
		printf("%s", resultline);
		split(resultline, permission, '|');
		gGroupPermissions[groupid][gpSQLId][permissioncount] = strval(permission[0]);
		gGroupPermissions[groupid][gpPermissionid][permissioncount] = strval(permission[1]);
		permissioncount++;
	}
}
I know thats the problem, so does anyone know why?

Help!
Reply
#2

Anyone?
Reply
#3

anyone
Reply
#4

I have no knowledge about MySql but I think that crash belongs to this line --->
Код:
	//if(gGroups[groupid][gSQLId]) return 0;
	printf("Loading Group %d Permissions...",groupid);
	format(query, sizeof(query), "SELECT id,permissionid FROM groups_permissions WHERE groupid = %d",groupid);
	printf(" SQL: %s",query);
	samp_mysql_query(query);
	samp_mysql_store_result();
because on my normal server i got many crashes because of "%s" and so on xD

...hope it helps you =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)