split crash
#1

I use split alot in my code for getting data from mysql querries to the relevant function and this was fine until 0.3b. I tried updating my code to 0.3b (compiling on the new pawno with everything updated) and I now have a crash, and as far as I can tell its on the split function. the code as it looks now is :
Код:
stock loadpickups() {
	new string[256],data[6][128];
	mysql_ping2(dba);
	print("About to query for pickups");
	mysql_query("SELECT model,type,x,y,z,vworld FROM static_pickups",-1,0,dba);
	print("query run, about to store");
	mysql_store_result(dba);
	print("store done");
	while(mysql_fetch_row(string,"|",dba))
	{
	    print("about to split 1");
		split(string,data,'|');
		print("done with split");
		CreatePickup(strval(data[0]),strval(data[1]),floatstr(data[2]),floatstr(data[3]),floatstr(data[4]),strval(data[5]));
		print("done with create");
	}
	mysql_free_result(dba);
	return 1;
}
The only change between the 0.3a and 0.3b version of this exact bit of code is that I have added the prints to try to find where it is crashing, which it shows "about to split 1" one time in the server log as the last thing. I can not see a reason why it would be crashing on the split function, but that appears to be where its crashing. Anyone have any ideas on my it might be crashing, or should I just be spending the time to convert the arge number of times I fetch rows and split to fetching fields and switching through rows?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)