Jump to content

  • Log in with Facebook Log in with Twitter Log In with Steam Log In with Google Sign In
  • Create Account

Tutorial info Visit support topic

  • Added on: Aug 22 2010 05:12 PM
  • Date Updated: Nov 21 2010 08:40 PM
  • Views: 1093
 


Converting NoQuarter XPSave Files fix for ReadDataFromFile error

Only useful for Server Administrators.

Posted by Krauersaut on Aug 22 2010 05:12 PM
If you are going to move your NoQuarter server from Linux to Windows or Windows to Linux, you will encounter problems with your XPsave files.

G_ReadDataFromFile: failed to read data to file (76/80)
G_xpsave_cleanup_expired_xp_file: failed to read xpsave file
Use the following Scripts to fix it:



Convert XPSave files from Linux to Windows

for f in *.xp
do
	head -c 12 $f > $f.new
	echo -e -n '\0000\0000\0000\0000' >> $f.new 
	tail -c +13 $f >> $f.new 
	cp $f $f.old
	mv $f.new $f
done

Convert XPSave files from Windows to Linux

for f in *.xp
do
	head -c 12 $f > $f.new
	tail -c +17 $f >> $f.new 
	cp $f $f.old
	mv $f.new $f
done

Or to be downloaded here. Run it either under Linux or Cygwin. Written in Bash.