29.05.2016, 00:02
Hello, I have tried to let my ooc shops save in a file but I keep gettings warnings so they dont save or load please help me out here..
Код:
Gamemode.pwn(4488) : warning 213: tag mismatch Gamemode.pwn(4489) : warning 213: tag mismatch Gamemode.pwn(4490) : warning 213: tag mismatch Gamemode.pwn(4491) : warning 213: tag mismatch Gamemode.pwn(4507 -- 4510) : warning 213: tag mismatch Gamemode.pwn(4507 -- 4511) : warning 213: tag mismatch Gamemode.pwn(4507 -- 4512) : warning 213: tag mismatch Gamemode.pwn(4507 -- 4513) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Warnings.
Код:
stock LoadOOCshops() { new arrCoords[7][64]; new strFromFile2[256]; new File: file = fopen("oocshops.cfg", io_read); if(file) { new idx; while (idx < sizeof(OOCshopInfo)) { fread(file, strFromFile2); splits(strFromFile2, arrCoords, '|'); OOCshopInfo[idx][OOCshopObjectID] = strval(arrCoords[0]); OOCshopInfo[idx][OOCUsed] = strval(arrCoords[1]); OOCshopInfo[idx][Float:OOCshopX] = floatstr(arrCoords[2]); OOCshopInfo[idx][Float:OOCshopY] = floatstr(arrCoords[3]); OOCshopInfo[idx][Float:OOCshopZ] = floatstr(arrCoords[4]); OOCshopInfo[idx][Float:OOCshopAngle] = floatstr(arrCoords[5]); idx++; } fclose(file); } return 1; } stock SaveOOCshops() { new szFileStr[326], File: fHandle = fopen("oocshops.cfg", io_write); for(new iIndex; iIndex < MAX_OOCSHOP; iIndex++) { format(szFileStr, sizeof(szFileStr), "%d|%d|%f|%f|%f|%f\r\n", OOCshopInfo[iIndex][OOCshopObjectID], OOCshopInfo[iIndex][OOCUsed], OOCshopInfo[iIndex][Float:OOCshopX], OOCshopInfo[iIndex][Float:OOCshopY], OOCshopInfo[iIndex][Float:OOCshopZ], OOCshopInfo[iIndex][Float:OOCshopAngle] ); fwrite(fHandle, szFileStr); } return fclose(fHandle); }