SA-MP Forums Archive
Error - 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: Error (/showthread.php?tid=660403)



Error - Heress - 02.11.2018

Line 2522
Quote:

if(sInfo[MedikuDarbas][playerid] != 0) return SendClientMessage(playerid,RAUDONA,"[SERVER]Tu jau dirbi čia!");

Error:
Quote:

(2522) : warning 213: tag mismatch




Re: Error - ApolloScripter - 02.11.2018

This is not specifically an error, but rather a warning, in this case is because your code is disorganized, try to put it like this:

pawn Code:
if(sInfo[MedikuDarbas][playerid] != 0)
    return SendClientMessage(playerid,RAUDONA,"[SERVER]Tu jau dirbi čia!");
And check if the variable type declares is specific to the player, this warning can be caused by a statement that does not agree with the use of the variable, send-me the variable to take a look


Re: Error - NaS - 02.11.2018

Quote:
Originally Posted by ApolloScripter
View Post
This is not specifically an error, but rather a warning, in this case is because your code is disorganized, try to put it like this:

pawn Code:
if(sInfo[MedikuDarbas][playerid] != 0)
    return SendClientMessage(playerid,RAUDONA,"[SERVER]Tu jau dirbi čia!");
If the problem persists, let me know.
And how would that produce a tag mismatch warning?
That code is organized fine, you don't need to put the return [...] in a seperate line.


Anyway, shouldn't it be this way:

PHP Code:
sInfo[playerid][MedikuDarbas
If sInfo uses an enum, you probably declared it similar to this:

PHP Code:
new sInfo[MAX_PLAYERS][E_PLAYER_INFO]; 
where E_PLAYER_INFO is your enum. In this case playerid must be the first index.


Another possibility would be if the function in which this code is has a tag, like Float. In that case you shouldn't return an int value (the return value of SendClientMessage is an integer).


Re: Error - Heress - 02.11.2018

Nope Apollo it dont work


Re: Error - Heress - 02.11.2018

Fixed thanks NaS


Re: Error - TheToretto - 02.11.2018

Read NaS's explanation, try to understand it and use this code:

pawn Code:
if(sInfo[playerid][MedikuDarbas] != 0)
    return SendClientMessage(playerid,RAUDONA,"[SERVER]Tu jau dirbi čia!");
EDIT: Didn't see your double post.


Re: Error - Heress - 02.11.2018

Quote:
Originally Posted by TheToretto
View Post
Read NaS's explanation, try to understand it and use this code:

pawn Code:
if(sInfo[playerid][MedikuDarbas] != 0)
    return SendClientMessage(playerid,RAUDONA,"[SERVER]Tu jau dirbi čia!");
EDIT: Didn't see your double post.
Yeah I know i mixed playerid and MedikuDarbas

I do
Quote:

sInfo[MedikuDarbas][playerid]

Must be
Quote:

sInfo[playerid][MedikuDarbas]

This is my 100's post