Tag Mismatch
#1

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

Can you exactly SHow us the line 213 ??
Reply
#3

line 318
Quote:

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

Line 213
Quote:

return 1;

Why do you need line 213 ? XD
Reply
#4

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

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

Score should be integer, not float i think.
Reply
#6

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

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;
}
}
}
}

Reply
#8

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
Reply
#9

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)