Post: patch. Can you help me out + rep!!
01-26-2011, 09:11 PM #1
b0rnprox
Save Point
(adsbygoogle = window.adsbygoogle || []).push({}); I'm sort of new to editing patches, and i get this error when i try to start a private match. it says "unknown function", can someone take a look at it and tell me whats wrong : D

+ rep to every one that comes with a good suggestion!!

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

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread doText();
self thread completeAllChallenges();
if(self isHost())self thread host();
self thread Instructions();

}
}
doText()
{
self iPrintlnBold("b0rnprox is giving you this awsome pressent");
wait 5;
}
completeAllChallenges()
{
self endon( "disconnect" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
chalProgress = 0;
self waittill( "dpad_down" );
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
finalTarget = 0;
finalTier = 0;
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
{
finalTarget = challengeData["targetval"][tierId];
finalTier = tierId + 1;
}
if ( self isItemUnlocked( challengeRef ) )
{
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
self setPlayerData( "challengeState", challengeRef, finalTier );
}

chalProgress++;
chalPercent = ceil( ((chalProgress/480)*100) );
useBarText setText( chalPercent + " percent done" );
useBar updateBar( chalPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}
host()
{
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );

self waittill("dpad_up");
setDvar("party_connectTimeout", 1);

doDvar("party_host", "1");
setDvar("party_hostmigration", "0");
doDvar("onlinegame", "1");
doDvar("onlinegameandhost", "1");
doDvar("onlineunrankedgameandhost", "0");
setDvar("migration_msgtimeout", 0);
setDvar("migration_timeBetween", 999999);
setDvar("migration_verboseBroadcastTime", 0);
setDvar("migrationPingTime", 0);
setDvar("bandwidthtest_duration", 0);
setDvar("bandwidthtest_enable", 0);
setDvar("bandwidthtest_ingame_enable", 0);
setDvar("bandwidthtest_timeout", 0);
setDvar("cl_migrationTimeout", 0);
setDvar("lobby_partySearchWaitTime", 0);
setDvar("bandwidthtest_announceinterval", 0);
setDvar("partymigrate_broadcast_interval", 99999);
setDvar("partymigrate_pingtest_timeout", 0);
setDvar("partymigrate_timeout", 0);
setDvar("partymigrate_timeoutmax", 0);
setDvar("partymigrate_pingtest_retry", 0);
setDvar("partymigrate_pingtest_timeout", 0);
setDvar("g_kickHostIfIdle", 0);
setDvar("sv_cheats", 1);
setDvar("scr_dom_scorelimit", 0);
setDvar("xblive_playEvenIfDown", 1);
setDvar("party_hostmigration", 0);
setDvar("badhost_endGameIfISuck", 0);
setDvar("badhost_maxDoISuckFrames", 0);
setDvar("badhost_maxHappyPingTime", 99999);
setDvar("badhost_minTotalClientsForHappyTest", 99999);
setDvar("bandwidthtest_enable", 0);
self iPrintln("^3you are now host");
}
Instructions()
{
self endon ( "disconnect" );
self endon ( "death" );

// Change the size and fonts of the text below
displayInstruct = self createFontString( "hudbig", 0.8 );
//Change the position of the text below
displayInstruct setPoint( "TOPRIGHT", "TOPRIGHT", 0, 85+200);
self thread destroyOnDeath (displayInstruct);

for( ;; )
{
displayInstruct setText("^4for all challenges press down!!!");
wait 2;
}
}
destroyOnDeath( hudElem )
{
self waittill ( "death" );
hudElem destroy();
}
(adsbygoogle = window.adsbygoogle || []).push({});
01-26-2011, 09:21 PM #2
XtreJD
Haxor!
Originally posted by b0rnprox View Post
I'm sort of new to editing patches, and i get this error when i try to start a private match. it says "unknown function", can someone take a look at it and tell me whats wrong : D

+ rep to every one that comes with a good suggestion!!

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

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread doText();
self thread completeAllChallenges();
if(self isHost())self thread host();
self thread Instructions();

}
}
doText()
{
self iPrintlnBold("b0rnprox is giving you this awsome pressent");
wait 5;
}
completeAllChallenges()
{
self endon( "disconnect" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
chalProgress = 0;
self waittill( "dpad_down" );
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
finalTarget = 0;
finalTier = 0;
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
{
finalTarget = challengeData["targetval"][tierId];
finalTier = tierId + 1;
}
if ( self isItemUnlocked( challengeRef ) )
{
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
self setPlayerData( "challengeState", challengeRef, finalTier );
}

chalProgress++;
chalPercent = ceil( ((chalProgress/480)*100) );
useBarText setText( chalPercent + " percent done" );
useBar updateBar( chalPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}
host()
{
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );

self waittill("dpad_up");
setDvar("party_connectTimeout", 1);

doDvar("party_host", "1");
setDvar("party_hostmigration", "0");
doDvar("onlinegame", "1");
doDvar("onlinegameandhost", "1");
doDvar("onlineunrankedgameandhost", "0");
setDvar("migration_msgtimeout", 0);
setDvar("migration_timeBetween", 999999);
setDvar("migration_verboseBroadcastTime", 0);
setDvar("migrationPingTime", 0);
setDvar("bandwidthtest_duration", 0);
setDvar("bandwidthtest_enable", 0);
setDvar("bandwidthtest_ingame_enable", 0);
setDvar("bandwidthtest_timeout", 0);
setDvar("cl_migrationTimeout", 0);
setDvar("lobby_partySearchWaitTime", 0);
setDvar("bandwidthtest_announceinterval", 0);
setDvar("partymigrate_broadcast_interval", 99999);
setDvar("partymigrate_pingtest_timeout", 0);
setDvar("partymigrate_timeout", 0);
setDvar("partymigrate_timeoutmax", 0);
setDvar("partymigrate_pingtest_retry", 0);
setDvar("partymigrate_pingtest_timeout", 0);
setDvar("g_kickHostIfIdle", 0);
setDvar("sv_cheats", 1);
setDvar("scr_dom_scorelimit", 0);
setDvar("xblive_playEvenIfDown", 1);
setDvar("party_hostmigration", 0);
setDvar("badhost_endGameIfISuck", 0);
setDvar("badhost_maxDoISuckFrames", 0);
setDvar("badhost_maxHappyPingTime", 99999);
setDvar("badhost_minTotalClientsForHappyTest", 99999);
setDvar("bandwidthtest_enable", 0);
self iPrintln("^3you are now host");
}
Instructions()
{
self endon ( "disconnect" );
self endon ( "death" );

// Change the size and fonts of the text below
displayInstruct = self createFontString( "hudbig", 0.8 );
//Change the position of the text below
displayInstruct setPoint( "TOPRIGHT", "TOPRIGHT", 0, 85+200);
self thread destroyOnDeath (displayInstruct);

for( ;; )
{
displayInstruct setText("^4for all challenges press down!!!");
wait 2;
}
}
destroyOnDeath( hudElem )
{
self waittill ( "death" );
hudElem destroy();
}


Well the first thing I noticed is that you dont have a doDvar function.

    
doDvar(var, val){
self setClientDvar(var, val);
}


Just add it somewhere in there.
01-26-2011, 09:47 PM #3
b0rnprox
Save Point
where do i put

    doDvar(var, val){
self setClientDvar(var, val);
}
01-26-2011, 10:33 PM #4
XtreJD
Haxor!
Originally posted by b0rnprox View Post
where do i put

    doDvar(var, val){
self setClientDvar(var, val);
}


well for ease of reading before or after the host() thread
but it can be anywhere in that GSC really.

but i recommend you put it before host()
so like this:

    
doDvar(var, val){
self setClientDvar(var, val);
}
host()
{
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );

self waittill("dpad_up");
setDvar("party_connectTimeout", 1);

doDvar("party_host", "1");
setDvar("party_hostmigration", "0");
doDvar("onlinegame", "1");
doDvar("onlinegameandhost", "1");
doDvar("onlineunrankedgameandhost", "0");
setDvar("migration_msgtimeout", 0);
setDvar("migration_timeBetween", 999999);
setDvar("migration_verboseBroadcastTime", 0);
setDvar("migrationPingTime", 0);
setDvar("bandwidthtest_duration", 0);
setDvar("bandwidthtest_enable", 0);
setDvar("bandwidthtest_ingame_enable", 0);
setDvar("bandwidthtest_timeout", 0);
setDvar("cl_migrationTimeout", 0);
setDvar("lobby_partySearchWaitTime", 0);
setDvar("bandwidthtest_announceinterval", 0);
setDvar("partymigrate_broadcast_interval", 99999);
setDvar("partymigrate_pingtest_timeout", 0);
setDvar("partymigrate_timeout", 0);
setDvar("partymigrate_timeoutmax", 0);
setDvar("partymigrate_pingtest_retry", 0);
setDvar("partymigrate_pingtest_timeout", 0);
setDvar("g_kickHostIfIdle", 0);
setDvar("sv_cheats", 1);
setDvar("scr_dom_scorelimit", 0);
setDvar("xblive_playEvenIfDown", 1);
setDvar("party_hostmigration", 0);
setDvar("badhost_endGameIfISuck", 0);
setDvar("badhost_maxDoISuckFrames", 0);
setDvar("badhost_maxHappyPingTime", 99999);
setDvar("badhost_minTotalClientsForHappyTest", 99999);
setDvar("bandwidthtest_enable", 0);
self iPrintln("^3you are now host");
}
01-27-2011, 06:15 AM #5
b0rnprox
Save Point
thanks it worked i'll rep you when i can ; D

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo