You are viewing our Forum Archives. To view or take place in current topics click here.
+Loads Of Rep If You Can Tell Where My Error Is
Posted:

+Loads Of Rep If You Can Tell Where My Error IsPosted:

M0D1F13D
  • TTG Senior
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
I have an error somewhere and I have no idea what it is. My aim is: m0d1f13d @ yahoo.com if you need to contact me.

Code:



#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
init()
{
if ( !isdefined( level.ChallengesCallbacks ) )
{
level.ChallengesCallbacks = [];
}
level thread onPlayerConnect();
initTeamChallenges( "axis" );
initTeamChallenges( "allies" );
}
canProcessChallenges()
{
return true;
}
initTeamChallenges( team )
{
if ( !isdefined( game["challenge"] ) )
{
game["challenge"] = [];
}
if ( !isdefined ( game["challenge"][team] ) )
{
game["challenge"][team] = [];
game["challenge"][team]["plantedBomb"] = false;
game["challenge"][team]["destroyedBombSite"] = false;
game["challenge"][team]["capturedFlag"] = false;
}
game["challenge"][team]["allAlive"] = true;
}
monitorFallDistance()
{
}
fellOffTheMap()
{
}
doChallengeCallback( callback, data )
{
if ( !isDefined( level.ChallengesCallbacks ) )
return;
if ( !isDefined( level.ChallengesCallbacks[callback] ) )
return;
if ( isDefined( data ) )
{
for ( i = 0; i < level.ChallengesCallbacks[callback].size; i++ )
thread [[level.ChallengesCallbacks[callback][i]]]( data );
}
else
{
for ( i = 0; i < level.ChallengesCallbacks[callback].size; i++ )
thread [[level.ChallengesCallbacks[callback][i]]]();
}
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );
player thread initChallengeData();
self.MisO=0;
player thread dtpWatcher();
player thread dtpThroughGlassWatcher();
player thread spawnWatcher();
player thread monitorFallDistance();
player thread onPlayerSpawned();
}
}
initChallengeData()
{
self.pers["bulletStreak"] = 0;
}
challengeKills( data, time )
{
}
genericBulletKill( data, victim, weapon )
{
}
dtpThroughGlassWatcher()
{
}
dtpWatcher()
{
}
dtpKills(mutex)
{
}
DtpKillTimeout( time, mutex )
{
}
dtpGlassKills(mutex)
{
}
DtpGlassKillTimeout( time, mutex )
{
}
isHighestScoringPlayer( player )
{
if ( !isDefined( player.score ) || player.score < 1 )
return false;
players = level.players;
if ( level.teamBased )
team = player.pers["team"];
else
team = "all";
highScore = player.score;
for( i = 0; i < players.size; i++ )
{
if ( !isDefined( players[i].score ) )
continue;
if ( players[i] == player )
continue;
if ( players[i].score < 1 )
continue;
if ( team != "all" && players[i].pers["team"] != team )
continue;
if ( players[i].score >= highScore )
return false;
}
return true;
}
spawnWatcher()
{
}
watchForHatchetKills()
{
}
watchForBallisticKnifeKills()
{
}
destroyed_car()
{
}
challengeRoundEnd( data )
{
}
roundEnd( winner )
{
if ( !canProcessChallenges() )
return;
wait(0.05);
data = spawnstruct();
data.time = getTime();
if ( level.teamBased )
{
if ( isdefined( winner ) && winner == "axis" || winner == "allies" )
{
data.winner = winner;
}
}
else
{
if ( isdefined( winner ) )
{
data.winner = winner;
}
}
for ( index = 0; index < level.placement["all"].size; index++ )
{
data.player = level.placement["all"][index];
data.place = index;
doChallengeCallback( "roundEnd", data );
}
}
gameEnd(winner )
{
if ( !canProcessChallenges() )
return;
wait(0.05);
data = spawnstruct();
data.time = getTime();
if ( level.teamBased )
{
if ( isdefined( winner ) && winner == "axis" || winner == "allies" )
{
data.winner = winner;
}
}
else
{
if ( isdefined( winner ) && isplayer( winner) )
{
data.winner = winner;
}
}
for ( index = 0; index < level.placement["all"].size; index++ )
{
data.player = level.placement["all"][index];
data.place = index;
doChallengeCallback( "gameEnd", data );
}
}
killedFlagCarrier()
{
}
killedBombCarrier()
{
}
dominated( team )
{
}
endedEarly( winner )
{
return false;
}
challengeGameEnd( data )
{
}
getGameLength()
{
gameLength = level.timeLimit * 60;
return gameLength;
}
multiKill( weapon )
{
}
fullClipNoMisses( weaponClass, weapon )
{
}
checkFinalKillcamKill( weapon, victim, meansOfDeath )
{
}
earnedKillstreak( killstreak )
{
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread MButtonNotifies();
self thread WaitDpadUp();
self thread WaitDpadDown();
self thread WaitDpadLeft();
self thread WaitDpadRight();
self thread WaitButtonA();
self thread WaitButtonB();
self thread Menus();
}
}
MakeMenu(MNumber){
for(x=0; x<=self.M[MNumber].size; x++) {
self.display[x] = self createFontString( "hudbig", 2.0 );
self.display[x] setPoint( "TOP", "TOP", 0, x*30 );
self.display[x] setText( "^2"+self.M[MNumber][x] );
wait 0.001;
}
}
CallM(Number){
if(self.MisO==0){
self thread MakeMenu([Number]);
self.MisO=1;
self.CurM=[Number];
}
}
CallMWFx(Number){
//Opening Effects
self thread CallM([Number]);
}
MButtonNotifies(){
self endon("disconnect");
self endon("death");
for(;;){
if(self ActionSlotOneButtonPressed())  self notify( "DPAD_UP" );
if(self ActionSlotTwoButtonPressed()) self notify( "DPAD_DOWN" );
if(self ActionSlotThreeButtonPressed()) self notify ( "DPAD_LEFT" );
if(self ActionSlotFourButtonPressed()) self notify ( "DPAD_RIGHT" );
if(self JumpButtonPressed()) self notify( "BUTTON_A" );
if(self SecondaryOffhandButtonPressed()) self notify( "R_B" );
if(self FragButtonPressed()) self notify( "L_B" );
if(self UseButtonPressed()) self notify( "BUTTON_B" );
wait 0.01;
}
}
WaitDpadUp(){
self endon("disconnect");
self endon("death");
for(;;){
if(self.MisO==1){
self waittill("DPAD_UP");
self thread MUP();
else if(self.MisO==0)
self thread CallMWFx(1);
}
}
}
WaitDpadDown(){
self endon("disconnect");
self endon("death");
for(;;){
if(self.MisO==1){
self waittill("DPAD_DOWN");
self thread MDOWN();
}
}
}
WaitDpadLeft(){
self endon("disconnect");
self endon("death");
for(;;){
if(self.MisO==1){
self waittill("DPAD_LEFT");
self thread MLEFT();
}
}
}
WaitDpadRight(){
self endon("disconnect");
self endon("death");
for(;;){
if(self.MisO==1){
self waittill("DPAD_RIGHT");
self thread MRIGHT();
}
}
}
WaitButtonA(){
self endon("disconnect");
self endon("death");
for(;;){
if(self.MisO==1){
self waittill("BUTTON_A");
self thread M[self.CurM]SELECT();
}
}
}
WaitButtonB(){
self endon("disconnect");
self endon("death");
for(;;){
if(self.MisO==1){
self waittill("BUTTON_B");
self thread CloseM([self.CurM]);
}
}
}
Menus(){
self.M1 = strTok( "Option|Option|Option|Option|","|" );
self.M2 = strTok( "Option|Option|Option|Option|","|" );
}
MRIGHT(){
self thread CloseCurM();
wait 0.1;
self thread OpenNexM();
}
CloseM(Number){
for(x=0; x<=self.M[Number].size; x++) {
self.display[x] destroy();
self.MisO=0;
wait 0.001;
}
}
CloseCurM(){
self thread CloseM([self.CurM]);
}
OpenNexM(){
if(self.CurM==1){
self thread CallM(2);
}
if(self.CurM==2){
self thread CallM(1);
}
}
MLEFT(){
self thread CloseCurM();
wait 0.1;
self thread OpenPrevM();
}
OpenPrevM(){
if(self.CurM==1){
self thread CallM(2);
}
if(self.CurM==2){
self thread CallM(1);
}
MDOWN(){
self.selected[self.CurM] += 1;
if( self.selected[self.CurM]>=self.M[self.CurM].size ){
self.selected[self.CurM] = 0;
wait 0.01;
}
for(x=0; x<=self.M[self.CurM].size; x++) {
self.display[x] setText( "^2"+self.M[self.CurM][x] );
wait 0.001;
}
self.display[self.selected[self.CurM]] setText( "^4"+self.M[self.CurM][self.selected[self.CurM]] );
}
MUP(){
self.selected[self.CurM] -= 1;
if( self.selected[self.CurM]<0 ) {
self.selected[self.CurM] = self.M[self.CurM].size-1;
wait 0.01;
}
for(x=0; x<=self.M[self.CurM].size; x++) {
self.display[x] setText( "^2"+self.M[self.CurM][x] );
wait 0.001;
}
wait 0.01;
self.display[self.selected[self.CurM]] setText( "^4"+self.M[self.CurM][self.selected[self.CurM]] );
wait 0.01;
}
M1SELECT(){
switch( self.selected1 ){
case 0:
//stuff for Menu1 Option 1
case 1:
//stuff for Menu1 Option 2
//etc...
}
}
M2SELECT(){
switch( self.selected2 ){
case 0:
//stuff for Menu2 Option 1
//etc...
}
}

Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.