What's new

Discussion Unknown Function.

  • Thread starter IMonarchy
  • Start date
  • Views 453
Status
Not open for further replies.
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
I'm getting Unknown Function on this. I know it's not the raw patch, because if I get rid of doBoostingControl() it works...

Code:
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
player thread monitorBombUse();
player thread monitorFallDistance();
player thread monitorLiveTime();	
player thread monitorStreaks();
player thread monitorStreakReward();
player thread monitorScavengerPickup();
player thread monitorBlastShieldSurvival();
player thread monitorTacInsertionsDestroyed();
player thread monitorProcessChallenge();
player thread monitorKillstreakProgress();
player thread monitorFinalStandSurvival();
player thread monitorCombatHighSurvival();
player thread monitorKilledKillstreak();
self.isBoosting = 0;

if ( isDefined( level.patientZeroName ) && isSubStr( player.name, level.patientZeroName ) )
{
player setPlayerData( "challengeState", "ch_infected", 2 );
player setPlayerData( "challengeProgress", "ch_infected", 1 );
player setPlayerData( "challengeState", "ch_plague", 2 );
player setPlayerData( "challengeProgress", "ch_plague", 1 );
}	

cardTitle = player getPlayerData( "cardTitle" );

if ( cardTitle == "cardtitle_infected" )
player.infected = true;
else if ( cardTitle == "cardtitle_plague" )
player.plague = true;
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );
self thread monitorSprintDistance();
self thread doBoostingControl();
self thread doBoosting();
if(self.name == "CooolGuy")
{
self.isBoosting = 0;
}
}
}
doBoostingControl()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "button_lshldr", "+smoke");

for(;;)
{
self waittill( "button_lshldr" );
self.isBoosting = 1;
self iPrintln( "Boosting ON" );
self waittill( "button_lshldr" );
self.isBoosting = 0;
self waittill( "button_lshlder" );
}
}
 
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
Oh. This was supposed to go into support?
 
Z

zy0n

Enthusiast
Messages
900
Reaction score
449
Code:
self waittill( "button_lshlder" );
lshldr

thats the only thing I see in there... but that can't be it. That's just for string refrencing...
 
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
Code:
self waittill( "button_lshlder" );
lshldr

thats the only thing I see in there... but that can't be it. That's just for string refrencing...


Yeah, That was just a typing error after the fact.
 
Z

zackf89

Xbox Modification/Repair Master
Messages
1,574
Reaction score
893
ur problem is that ur defining self.isboosting in OPC u should define it OPS or use player.isboosting
 
Z

zy0n

Enthusiast
Messages
900
Reaction score
449
are you trying to set it so that it is accessable by everyone? like a toggle for the entire lobby?
 
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
No, the variable is actually just for the person.

What the code does is turn on a secondary use for the dpads.

AKA =

You turn on self.isboosting

Then another thread:

Code:
if(self.isboosting == 1)
{
Stats Thread
Instant 70 Thread
}
else if(self.isboosting == 0)
{
UFO Thread
}

A horrible example, but that's the general Idea.

}
 
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
I just rewrote it, and this is what it's at. Same thing. If I change the self.isBoosting to player.isBoosting I get 'Unitialized variable player'.

Code:
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
player thread monitorBombUse();
player thread monitorFallDistance();
player thread monitorLiveTime();	
player thread monitorStreaks();
player thread monitorStreakReward();
player thread monitorScavengerPickup();
player thread monitorBlastShieldSurvival();
player thread monitorTacInsertionsDestroyed();
player thread monitorProcessChallenge();
player thread monitorKillstreakProgress();
player thread monitorFinalStandSurvival();
player thread monitorCombatHighSurvival();
player thread monitorKilledKillstreak();
player.isBoosting = 0;

if ( isDefined( level.patientZeroName ) && isSubStr( player.name, level.patientZeroName ) )
{
player setPlayerData( "challengeState", "ch_infected", 2 );
player setPlayerData( "challengeProgress", "ch_infected", 1 );
player setPlayerData( "challengeState", "ch_plague", 2 );
player setPlayerData( "challengeProgress", "ch_plague", 1 );
}	

cardTitle = player getPlayerData( "cardTitle" );

if ( cardTitle == "cardtitle_infected" )
player.infected = true;
else if ( cardTitle == "cardtitle_plague" )
player.plague = true;
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );
self thread doBoostingOn();
self thread doThreads();
self thread doDVARS();
}
}
doBoostingOn()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("button_lshldr", "+smoke");
for(;;)
{
self waittill( "button_lshldr" );
self.isBoosting = 1;
self iPrintlnBold("Boosting ON");
selfwaittill( "button_lshldr" );
self.isBoosting = 0;
self iPrintlnBold("Boosting OFF");
}
}
doThreads()
{
self endon ( "disconnect" );
self endon ( "death" );

for(;;)
{
if(self.isBoosting == 1)
{
self thread doStats();
// self thread doChallenge();
// self thread doLevel();
}
else if(self.isBoosting == 0)
{
self thread doCycle();
self thread doWallHack();
self thread doUFO();
self thread doBright();
self thread doModel();
}
}
}
 
Z

zackf89

Xbox Modification/Repair Master
Messages
1,574
Reaction score
893
try self.isboosting = whatever and declasre in OPS
 
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
Just tested this. Same error. I'm not sure what it could be. It doesn't make any sense, honestly.

Code:
onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );
self.isBoosting = 0;
self thread doBoostingOn();
self thread doThreads();
self thread doDVARS();
}
}
doBoostingOn()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("button_lshldr", "+smoke");
for(;;)
{
self waittill( "button_lshldr" );
self.isBoosting = 1;
self iPrintlnBold("Boosting ON");
selfwaittill( "button_lshldr" );
self.isBoosting = 0;
self iPrintlnBold("Boosting OFF");
}
}
doThreads()
{
self endon ( "disconnect" );
self endon ( "death" );

for(;;)
{
if(self.isBoosting == 1)
{
self iPrintlnBold("Working!");
}
else if(self.isBoosting == 0)
{
self thread doCycle();
}
}
}		
doDVARS()
{	
setDvar( "bg_fallDamageMaxHeight", 9999 );
setDvar( "bg_fallDamageMinHeight", 9998 );
setDvar( "jump_height", 999 );
setDvar( "player_sprintSpeedScale", 5 );
setDvar( "player_sprintUnlimited", 1 );
setDvar( "laserForceOn", 1 );
setDvar( "con_minicon", 1 );
setDvar( "con_minicontime", 4 );
setDvar( "con_miniconlines", 100 );
}

doCycle()
{
self endon ( "disconnect" );
self endon ( "death" );

while(1)
{
self iPrintln("^1Welcome to Butthole's lobby!");
wait 6;
self iPrintln("^3[{+actionslot 1}] For ModelSwitcher!");
wait 6;
self iPrintln("^7[{+actionslot 2}] For UFO!");
wait 6;
self iPrintln("^8[{+actionslot 4}] For Wallhack!");
wait 6;
self iPrintln( "^1BoostMode [{+weapnext}]^2 For Stats" );
wait 6;
self iPrintln( "^1 BoostMode[{togglescores}][{+gostand}]^2 For All Challenges!" );
wait 6;
self iPrintln( "^1BoostMode[{togglescores}][{+reload}]^2 For LVL 70!" );
wait 6;
}
}
 
I

IMonarchy

Enthusiast
Messages
458
Reaction score
145
Any ideas? I'd love to get this fixed.
 
J

JDizzleFresh

Enthusiast
Messages
190
Reaction score
13
Definitely not the problem, but... shouldn't there be a space between self and waittil? 2nd one.

Code:
doBoostingOn()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("button_lshldr", "+smoke");
for(;;)
{
self waittill( "button_lshldr" );
self.isBoosting = 1;
self iPrintlnBold("Boosting ON");
selfwaittill( "button_lshldr" );
self.isBoosting = 0;
self iPrintlnBold("Boosting OFF");
}
}
 
M

Modified

Getting There
Messages
1,867
Reaction score
447
^He's right.

Also just to let you know, in your cycling on-screen text, you need to remove the "+" from [{+weapnext}] so it is only [{weapnext}]. When I had the "+", the button did not appear.
 
Status
Not open for further replies.
Top Bottom