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=289140)



Tag Mismatch - ImprezBart - 10.10.2011

Tag Mismatch.

Код:
public OnPlayerSpawn(playerid)
{
   	if(gPlayerLogged[playerid] == 0)
	{
        SCM(playerid,COLOR_LIGHTBLUE,"You have to login before you spawn.");
		return Kick(playerid);
	}
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);

    SetPlayerPos(playerid, dini_Float(file, "PosX"), dini_Float(file, "PosY"), dini_Float(file, "PosZ"));
    SetPlayerFacingAngle(playerid, dini_Float(file, "PosAngle"));
    SetPlayerScore(playerid, dini_Float(file, "Level"));
    SetPlayerHealth(playerid, dini_Float(file, "Health"));
    SetPlayerArmour(playerid, dini_Float(file, "Armour"));
    SendClientMessage(playerid, COLOR_YELLOW, "Welcome to East Side Roleplay, script last edited on Monday 10 October 2011");

   	if(PlayerInfo[playerid][pSkin] != 0)
	{
		return SetPlayerSkin(playerid, dini_Int(file, "Skin"));
	}
	return 1;
}

Код:
C:\Users\Bart\Downloads\samp03csvr_R2-2_win32\gamemodes\esrp.pwn(318) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Tag Mismatch - Jason_Thunde - 10.10.2011

Can you exactly SHow us the line 213 ??


Re: Tag Mismatch - ImprezBart - 10.10.2011

line 318
Quote:

SetPlayerScore(playerid, dini_Float(file, "Level"));

Line 213
Quote:

return 1;

Why do you need line 213 ? XD


Re: Tag Mismatch - [DK]Dark_Knight - 10.10.2011

health and armor are floats
score is an integer not a float

use this i think:
pawn Код:
SetPlayerScore(playerid, dini_Int(file, "Level"));



Re: Tag Mismatch - [Diablo] - 10.10.2011

Score should be integer, not float i think.


Re: Tag Mismatch - [MG]Dimi - 10.10.2011

Quote:
Originally Posted by [DK]Dark_Knight
Посмотреть сообщение
post us the function (SetPlayerScore)
You are kidding me? Problem is that Score isn't float.


Re: Tag Mismatch - ImprezBart - 10.10.2011

Blabla

Quote:

public ScoreUpdate()
{
new Score;
new name[MAX_PLAYER_NAME];
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof(name));
Score = PlayerInfo[i][pLevel];
SetPlayerScore(i, Score);
if (Score > ScoreOld)
{
ScoreOld = Score;
}
}
}
}




Re: Tag Mismatch - [DK]Dark_Knight - 10.10.2011

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
You are kidding me? Problem is that Score isn't float.
Yeah just realized, when i reread the post, my bad


Re: Tag Mismatch - ImprezBart - 10.10.2011

So how do i fix this, i'm new to scripting


Re: Tag Mismatch - [DK]Dark_Knight - 10.10.2011

Quote:
Originally Posted by [DK]Dark_Knight
Посмотреть сообщение
health and armor are floats
score is an integer not a float

use this i think:
pawn Код:
SetPlayerScore(playerid, dini_Int(file, "Level"));
read this