Mysql Help
#1

Not sure if this would be the correct section since its Mysql help but it does involve scripting so my problem I am making a VIP lounge and locker and I am trying to save the location of it using this stock that I made:

Код:
stock saveLounge() { 
	format(szLargeString, sizeof(szLargeString), "UPDATE viplounge SET VIPLoungeExtX = '%f', VIPLoungeExtY = '%f', VIPLoungeExtZ = '%f', VIPLoungeIntX = '%f', VIPLoungeIntY = '%f', VIPLoungeIntZ = %f'", VIPLoungeExt[0], VIPLoungeExt[1], VIPLoungeExt[2], VIPLoungeInt[0], VIPLoungeInt[1], VIPLoungeInt[2]); 
	format(szLargeString, sizeof(szLargeString), "%s, VIPLoungeVW = '%d', VIPLoungeIntID = '%d', VIPLoungeExtVW = '%d'", szLargeString, VIPLoungeVW, VIPLoungeIntID, VIPLoungeExtVW);
	format(szLargeString, sizeof(szLargeString), "%s, VLockerX = '%f', VLockerY = '%f', VLockerZ = '%f', VLockerVW = '%d', VLockerInt = '%d' WHERE loungeid = '1'",szLargeString, VLockerPos[0], VLockerPos[1], VLockerPos[2], VLockerVW, VLockerInt);
	mysql_query(szLargeString);
	return 1;
}
I made the row in Mysql and I made every column I need but for some reason it won't save anything. I made sure to use the stock in my save data command and I load the data when the server starts but after every server restart I have to replace the lounge and the Mysql tables are empty. If you need any other code just tell me, any help is appreciated.
Reply


Messages In This Thread
Mysql Help - by Chenko - 11.08.2012, 21:48
Re: Mysql Help - by Vince - 11.08.2012, 21:55
Re: Mysql Help - by Chenko - 12.08.2012, 16:08
Re: Mysql Help - by Chenko - 13.08.2012, 02:31
Re: Mysql Help - by Kirollos - 13.08.2012, 02:49
Re: Mysql Help - by Chenko - 13.08.2012, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)