I'm having problems working the following script taken from this topic here on the forum:
Script:
init()
{
level.clientid = 0;
level.perk_purchase_limit = 9;
level thread onplayerconnect();
}
onplayerconnect()
{
for ( ;; )
{
level waittill( "connecting", player );
player thread onplayerspawned();
player.clientid = level.clientid;
level.clientid++;
player thread healthPlayer(); // Here I call my HUD HEALTH function
}
}
healthPlayer()
{
self endon("disconnect");
//self iprintln( "HEALTH: "+ self.health);
self.healthText = createFontString("Objective" , 1.7); //Fixed
self.healthText setPoint("CENTER", "TOP", 300, "CENTER");
while(true)
{
self.healthText setText( "^2HEALTH: ^7"+ self.health);
wait 0.5;
}
}
Console Errors:
**** 3 script error(s):
**** Unresolved external : "onplayerspawned" with 0 parameters in "health_bar" at line 1 ****
**** Unresolved external : "createfontstring" with 2 parameters in "health_bar" at line 1 ****
**** Unresolved external : "setpoint" with 4 parameters in "hea
Can you help me resolve this?