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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tag mismatch? (
/showthread.php?tid=266606)
Tag mismatch? -
Outcast - 05.07.2011
I don't know what's wrong with this line, I get a tag mismatch warning.
pawn Код:
new Bool:pLoggedIn[MAX_PLAYERS] = false;
This is where I use it:
pawn Код:
if(!pLoggedIn[playerid]) return 1;
Re: Tag mismatch? -
Lorenc_ - 05.07.2011
Booleans are automatically equaled to false once created
just remove '= false;'
pawn Код:
new bool:pLoggedIn[MAX_PLAYERS];
Should work now.
Re: Tag mismatch? -
RyDeR` - 05.07.2011
Don't use 'bool' with capital letter 'B'.
pawn Код:
new bool: pLoggedIn[MAX_PLAYERS] = false;
try it now.
Re: Tag mismatch? -
Outcast - 05.07.2011
lol, I used it with a capital B, that was the problem. I've got one more problem. I'm getting this error "array sizes do not match" for the following.
pawn Код:
if(listitem = 0){
pInfo[playerid][pSex] = "Male";
}
else{
pInfo[playerid][pSex] = "Female";
}
this is in the enumeration
what am I doing wrong?
Re: Tag mismatch? -
MadeMan - 05.07.2011
Try using format.
Re: Tag mismatch? -
Outcast - 05.07.2011
pawn Код:
format(pInfo[playerid][pSex], 10, "Male");
I did that but now it doesn't save.
Re: Tag mismatch? -
Donya - 05.07.2011
pawn Код:
strmid(pInfo[playerid][pSex], "Male", false, strlen("Male") /*4*/, 6);
make psex size [6]
Re: Tag mismatch? -
RyDeR` - 05.07.2011
Should work, but using strcat and/or memcpy for copying strings is faster:
http://forum.sa-mp.com/showpost.php?...postcount=2130
Example:
pawn Код:
strCopy("Male", pInfo[playerid][pSex], -1, sizeof(pInfo[]));