SA-MP Forums Archive
tag mismatch - 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)
+--- Thread: tag mismatch (/showthread.php?tid=381178)



tag mismatch - thefatshizms - 28.09.2012

i got a tag mismatch in this

pawn Код:
format(string, sizeof(string), "Event name: %s", Events[i]);



Re: tag mismatch - Jarnu - 28.09.2012

Probably its a problem with
pawn Код:
Events[i]
make sure your variable of this is
pawn Код:
new Events[MAX_PLAYERS];



Re: tag mismatch - West X - 28.09.2012

If he's trying to format 'Event Name', I highly doubt that it would be an integer, but a string.


Re: tag mismatch - HuSs3n - 28.09.2012

it should be
new Events[MAX_PLAYERS][128];

still , it depends on how he wants to use it


Re: tag mismatch - thefatshizms - 28.09.2012

hi sorry i forgot to mention its a enum
pawn Код:
new Events[event];
inside the enum im saving the names of the event name and in the string im trying to display the names if there is any

pawn Код:
new count, string[128];
                    for(new i, j = MAX_EVENTS; i != j;i++)
                    {
                        format(string, sizeof(string), "Event name: %s", Events[i]);
                        count++;
                    }



Re: tag mismatch - Jarnu - 28.09.2012

EDIT:
pawn Код:
for(new i; j = MAX_EVENTS; i != j;i++)
hum.. try now


Re: tag mismatch - HuSs3n - 28.09.2012

try
new Events[event][50];


Re: tag mismatch - GordonP - 28.09.2012

Use new Events[MAX_PLAYERS][128];


Re: tag mismatch - thefatshizms - 28.09.2012

Quote:
Originally Posted by GordonP
Посмотреть сообщение
Use new Events[MAX_PLAYERS][128];
nope
Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
try
new Events[event][50];
nope

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
EDIT:
pawn Код:
for(new i; j = MAX_EVENTS; i != j;i++)
hum.. try now
Код:
C:\Users\iphone\Desktop\SFCNR\Sfcnr Scripting\filterscripts\event.pwn(225) : error 017: undefined symbol "j"
C:\Users\iphone\Desktop\SFCNR\Sfcnr Scripting\filterscripts\event.pwn(225) : warning 215: expression has no effect
C:\Users\iphone\Desktop\SFCNR\Sfcnr Scripting\filterscripts\event.pwn(225) : error 001: expected token: ")", but found ";"
C:\Users\iphone\Desktop\SFCNR\Sfcnr Scripting\filterscripts\event.pwn(225) : error 036: empty statement
C:\Users\iphone\Desktop\SFCNR\Sfcnr Scripting\filterscripts\event.pwn(225) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.