Weird Tag Mismatch :S
#1

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;
}
Reply
#2

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.
Reply
#3

So what do i do? to fix it?

(Its my first attempt at file functions)
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)