Weird Tag Mismatch :S - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weird Tag Mismatch :S (
/showthread.php?tid=101545)
Weird Tag Mismatch :S -
Kyle - 11.10.2009
I get tag mismatch at line 7
format(str, sizeof(str), "Name is %s", Name1);
pawn Код:
if (strcmp("/findname", cmdtext, true, 10) == 0)
{
new File:Name1 = fopen("BusinessOwner.txt", io_read);
new str[100];
while(fread(Name1, str))
{
format(str, sizeof(str), "Name is %s", Name1);
SendClientMessage(playerid, COLOR_ERROR, str);
}
return 1;
}
Re: Weird Tag Mismatch :S -
Donny_k - 11.10.2009
Quote:
Originally Posted by KyleSmith
I get tag mismatch at line 7
format(str, sizeof(str), "Name is %s", Name1);
pawn Код:
if (strcmp("/findname", cmdtext, true, 10) == 0) { new File:Name1 = fopen("BusinessOwner.txt", io_read); new str[100]; while(fread(Name1, str)) { format(str, sizeof(str), "Name is %s", Name1); SendClientMessage(playerid, COLOR_ERROR, str); } return 1; }
|
There is nothing wierd about it dude, you are using a file pointer as a string.
Re: Weird Tag Mismatch :S -
Kyle - 11.10.2009
So what do i do? to fix it?
(Its my first attempt at file functions)
Re: Weird Tag Mismatch :S -
Donny_k - 11.10.2009
Well that depends on what you are trying to do dude.
For now replace the "Name1" variable at the end of your format for the "str" variable as it contains the data you read from the file.