02.05.2013, 15:23
(1215) : error 017: undefined symbol "file"
(1211) : error 017: undefined symbol "file"
(1213) : error 017: undefined symbol "file"
(1207) : error 017: undefined symbol "file"
(1206) : error 001: expected token: "-string end-", but found "-identifier-"
it is 1206 to 1215
------------------------------------------------------------------------------
and this code in
(1211) : error 017: undefined symbol "file"
(1213) : error 017: undefined symbol "file"
(1207) : error 017: undefined symbol "file"
(1206) : error 001: expected token: "-string end-", but found "-identifier-"
it is 1206 to 1215
Код:
new File:file=fopen(tstring,io_read); fread(file,tstring); while(tstring[0]) { format(tstring,strlen(tstring),"%s",tstring); //Delete last character fread(file,tstring2); AddItem(playerid,tstring,strval(tstring2)); fread(file,tstring); } fclose(file);
and this code in
Код:
stock LoadInventory(playerid) { new tstring[48]; new tstring2[12]; GetPlayerName(playerid,tstring,48); format(tstring,48,"Inventory/%s.inv",tstring); if(!fexist(tstring))return 0; new File:file=fopen(tstring,io_read); fread(file,tstring); while(tstring[0]) { format(tstring,strlen(tstring),"%s",tstring); //Delete last character fread(file,tstring2); AddItem(playerid,tstring,strval(tstring2)); fread(file,tstring); } fclose(file); GetPlayerName(playerid,tstring,24); printf("[INV] %s[%d]'s inventory loaded.",tstring,playerid); return 1; }