defined code that shows undefined -
Tony$$ - 09.06.2015
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);
}
}
Re: defined code that shows undefined -
Vince - 09.06.2015
Verify that it is not between any #if - #endif construct.
Re: defined code that shows undefined -
Tony$$ - 09.06.2015
Nope they arent.
Re: defined code that shows undefined -
Tony$$ - 09.06.2015
So should i write anything to verify it?
Re: defined code that shows undefined -
Luis- - 09.06.2015
It is in the same script, isn't it?
Re: defined code that shows undefined -
Tony$$ - 09.06.2015
Well different .pwns but its connected. Usually in the old system it did define.
Re: defined code that shows undefined -
Tony$$ - 09.06.2015
It did define in the same way.
By the way im not sure this is the reason.
Код:
#pragma unused reason
Re: defined code that shows undefined -
Tony$$ - 09.06.2015
or maybe its the position? Where the section is.
Re: defined code that shows undefined -
Ritzy2K - 09.06.2015
if its in a different script try to make it a stock function?
Re: defined code that shows undefined -
Tony$$ - 09.06.2015
already tried it gave me the same error.