P
oO Di2eamZz
Enthusiast
OK my code looks good and i thought it would work perfectly but I get this error
Server Script Compile Error: Uninitialised Variable 'hud6'
Can Someone with good knowledge look this over please?
This is what I have on player spawned
This is my Toggle Thread
And Here are my huds
I cant see what the problem is... anyone take a guess????
Server Script Compile Error: Uninitialised Variable 'hud6'
Can Someone with good knowledge look this over please?
This is what I have on player spawned
Code:
self thread doToggleInstruct();
This is my Toggle Thread
Code:
Toggle()
{
while( 1 )
{
wait .5;
if( self UseButtonPressed() && self GetStance() == "stand" )
{
self notify( "Instruct" );
}
}
}
doToggleInstruct()
{
self endon ( "disconnect" );
self endon ( "death" );
for(;;)
{
wait 1;
self waittill( "Instruct" );
{
self thread doInstruct();
self thread doInstructA();
self thread doInstructB();
self thread doInstructC();
self thread doInstructD();
self thread doInstructE();
self thread doInstructF();
self iPrintln("^5INSTRUCTIONS ^2ON");
}
wait 3;
self waittill( "Instruct" );
{
hud6 destroy();
hud7 destroy();
hud8 destroy();
hud9 destroy();
hud10 destroy();
hud11 destroy();
hud12 destroy();
self iPrintln("^5INSTRUCTIONS ^1OFF");
}
}
}
And Here are my huds
Code:
doInstruct()
{
hud6 = newHudElem();
hud6.foreground = true;
hud6.sort = 1;
hud6.hidewheninmenu = false;
hud6.alignX = "right";
hud6.alignY = "top";
hud6.horzAlign = "right";
hud6.vertAlign = "top";
hud6.x = 0;
hud6.y = 23;
hud6.alpha = 1;
hud6.fontscale = 1.25;
hud6.color = ( 1, 0, 0 );
while(true)
{
hud6 settext( "^2UFO Mode: ^5Crouch and Hold [{+usereload}]" );
wait .5;
}
wait 10;
}
doInstructA()
{
hud7 = newHudElem();
hud7.foreground = true;
hud7.sort = 1;
hud7.hidewheninmenu = false;
hud7.alignX = "right";
hud7.alignY = "top";
hud7.horzAlign = "right";
hud7.vertAlign = "top";
hud7.x = 0;
hud7.y = 36;
hud7.alpha = 1;
hud7.fontscale = 1.25;
hud7.color = ( 1, 1, 0 );
while(true)
{
hud7 settext( "^1Visions: ^3Crouch and Press [{+frag}]" );
wait .5;
}
wait 10;
}
doInstructB()
{
hud8 = newHudElem();
hud8.foreground = true;
hud8.sort = 1;
hud8.hidewheninmenu = false;
hud8.alignX = "right";
hud8.alignY = "top";
hud8.horzAlign = "right";
hud8.vertAlign = "top";
hud8.x = 0;
hud8.y = 49;
hud8.alpha = 1;
hud8.fontscale = 1.25;
hud8.color = ( 1, 1, 1 );
while(true)
{
hud8 settext( "^1D^2i^3s^5c^1o ^2Fog: ^5Crouch and Press [{+melee}]" );
wait .5;
}
wait 10;
}
doInstructC()
{
hud9 = newHudElem();
hud9.foreground = true;
hud9.sort = 1;
hud9.hidewheninmenu = false;
hud9.alignX = "right";
hud9.alignY = "top";
hud9.horzAlign = "right";
hud9.vertAlign = "top";
hud9.x = 0;
hud9.y = 62;
hud9.alpha = 1;
hud9.fontscale = 1.25;
hud9.color = ( 0, 0, 1 );
while(true)
{
hud9 settext( "^3Change Models: ^1Crouch and Press [{weapnext}]" );
wait .5;
}
wait 10;
}
doInstructD()
{
hud10 = newHudElem();
hud10.foreground = true;
hud10.sort = 1;
hud10.hidewheninmenu = false;
hud10.alignX = "right";
hud10.alignY = "top";
hud10.horzAlign = "right";
hud10.vertAlign = "top";
hud10.x = 0;
hud10.y = 75;
hud10.alpha = 1;
hud10.fontscale = 1.25;
hud10.color = ( 0, 1, 1 );
while(true)
{
hud10 settext( "^5Pick a Prestige: ^2Lie Down and Press [{weapnext}]" );
wait .5;
}
wait 10;
}
doInstructE()
{
hud11 = newHudElem();
hud11.foreground = true;
hud11.sort = 1;
hud11.hidewheninmenu = false;
hud11.alignX = "right";
hud11.alignY = "top";
hud11.horzAlign = "right";
hud11.vertAlign = "top";
hud11.x = 0;
hud11.y = 88;
hud11.alpha = 1;
hud11.fontscale = 1.25;
hud11.color = ( 0, 1, 0 );
while(true)
{
hud11 settext( "^3Infectable Visions: ^1Lie Down and Press [{+frag}]" );
wait .5;
}
wait 10;
}
doInstructF()
{
hud12 = newHudElem();
hud12.foreground = true;
hud12.sort = 1;
hud12.hidewheninmenu = false;
hud12.alignX = "right";
hud12.alignY = "top";
hud12.horzAlign = "right";
hud12.vertAlign = "top";
hud12.x = 0;
hud12.y = 101;
hud12.alpha = 1;
hud12.fontscale = 1.25;
hud12.color = ( 1, 0, 1 );
while(true)
{
hud12 settext( "^2100k Points: ^5Lie Down and Press [{+speed_throw}]" );
wait .5;
}
wait 10;
}
I cant see what the problem is... anyone take a guess????