defined code that shows undefined
#1

Yo,
I keep get this error
Код:
wcrp\hospital.pwn(60) : error 017: undefined symbol "CheckWounded"
This is the error section
Код:
hospitalOnPlayerSpawn(playerid) {
	SetPlayerHealthEx(playerid, MAX_HEALTH);
	if(isInPaintball(playerid)) {
		paintballRespawn(playerid);
		DeletePVar(playerid, "PlayerDied");
		return 1;
	}
	if(GetPVarInt(playerid, "AdminDuty") != 0) {
		return 1;
	}
	if(GetPVarInt(playerid, "PlayerDied") == 1) {
		if(numMedicsOnline() == 0 || playerDiseaseInstantDeath(playerid)) {
            CheckWounded(playerid);
		}
		if(removeDiseaseOnDeath(playerid)) {
			curePlayerDisease(playerid);
		}
		DeletePVar(playerid, "PlayerDied");
	}
	SetPlayerHealthEx(playerid, 98.0);
	return 1;
}
but its defined right here
Код:
CheckWounded(playerid) {
	if(GetIntVar(playerid, "JustDied") == 1)
	{
		PutPlayer(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]);
		SetInterior(playerid, PlayerInfo[playerid][pInt]);
		SetWorld(playerid, PlayerInfo[playerid][pWorld]);
		SetPlayerCameraPos(playerid,PlayerInfo[playerid][pPosX]+3,PlayerInfo[playerid][pPosY]+3,PlayerInfo[playerid][pPosZ]+3);
		SetPlayerCameraLookAt(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]);
		SetPlayerHealth(playerid, 1000.0);
		GiveCash(playerid, -300);
		SCM(playerid, COLOR_GREY, "You've lost $300 when you died.");
		SCM(playerid, COLOR_YELLOW, "You are brutally wounded, you may wait for a medic or '/acceptdeath'.");
		FreezePlayer(playerid);
		OnAnim{playerid} = true;
		ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_DIE",3.5,0,0,0,1,0);
	}
}
Reply
#2

Verify that it is not between any #if - #endif construct.
Reply
#3

Nope they arent.
Reply
#4

So should i write anything to verify it?
Reply
#5

It is in the same script, isn't it?
Reply
#6

Well different .pwns but its connected. Usually in the old system it did define.
Reply
#7

It did define in the same way.
By the way im not sure this is the reason.
Код:
	#pragma unused reason
Reply
#8

or maybe its the position? Where the section is.
Reply
#9

if its in a different script try to make it a stock function?
Reply
#10

already tried it gave me the same error.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)