Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing Case Statement
#1
[Image: 9B867401C1C710562AED89B490AB65EB1B73C153]

my init:
Code:
init()
{
level thread onPlayerConnect();
}

randoms:
Code:
else
                {
    switch(RandomInt(23))
    {
        case 0:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("dogs_mp", "dogs_mp", true, false);
        break;
        case 1:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("helicopter_gunner_mp", "helicopter_gunner_mp", true, false);
        break;
        case 2:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("radardirection_mp", "radardirection_mp", true, false);
        break;
        case 3:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("mortar_mp", "mortar_mp", true, false);
        break;
        case 4:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("counteruav_mp", "counteruav_mp", true, false);
        break;
        case 5:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("rcbomb_mp", "rcbomb_mp", true, false);
        break;
        case 6:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("helicopter_player_firstperson_mp", "helicopter_player_firstperson_mp", true, false);
        break;
        case 7:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("airstrike_mp", "airstrike_mp", true, false);
        break;
        case 8:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("helicopter_mp", "helicopter_mp", true, false);
        break;
        case 9:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("autoturret_mp", "autoturret_mp", true, false);
        break;
        case 10:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("napalm_mp", "napalm_mp", true, false);
        break;
        case 11:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("auto_tow_mp", "auto_tow_mp", true, false);
        break;
        case 12:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("radar_mp", "radar_mp", true, false);
        break;
        case 13:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("radardirection_mp", "radardirection_mp", true, false);
        break;
        case 14:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("mortar_mp", "mortar_mp", true, false);
        break;
        case 15:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("counteruav_mp", "counteruav_mp", true, false);
        break;
        case 16:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("rcbomb_mp", "rcbomb_mp", true, false);
        break;
        case 17:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("airstrike_mp", "airstrike_mp", true, false);
        break;
        case 18:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("helicopter_mp", "helicopter_mp", true, false);
        break;
        case 19:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("autoturret_mp", "autoturret_mp", true, false);
        break;
        case 20:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("napalm_mp", "napalm_mp", true, false);
        break;
        case 21:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("auto_tow_mp", "auto_tow_mp", true, false);
        break;
        case 22:
            self maps\mp\gametypes\_hardpoints::giveKillstreak("radar_mp", "radar_mp", true, false);
        break;

Code:
                else
                {
            switch(RandomInt(8))
    {
        case 0:
            self giveWeapon("frag_grenade_mp");
        break;
        case 1:
            self giveWeapon("tabun_gas_mp");
        break;
        case 2:
            self giveWeapon("concussion_grenade_mp");
        break;
        case 3:
            self giveWeapon("hatchet_mp");
        break;
        case 4:
            self giveWeapon("satchel_charge_mp");
        break;
        case 5:
        self giveWeapon("sticky_grenade_mp");
        break;
        case 6:
            self giveWeapon("nightingale_mp");
        break;
        case 7:
        self giveWeapon("flash_grenade_mp");
        break;
        wait 1;
self thread goBack();
        }

(the brackets don't matter now, I just copied the other shit)


What is wrong? and how do I fix this? :S
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#2
It's probably this:

Code:
        case 7:
        self giveWeapon("flash_grenade_mp");
        break;
        wait 1;
self thread goBack();
        }

Either put the wait and the "goback()" threading before the "break" or after the bracket.

Like this:
Code:
        case 7:
        self giveWeapon("flash_grenade_mp");
        break;
        }
        wait 1;
self thread goBack();
Reply

#3
ty @Rendflex Wink it worked Smile but now i get this error:

[Image: 558297327B982E02CA3A84F64977437284F6C166]

and it works when i use it in _rank.gsc :S
Code:
                napalmSelectorSize = getDvarIntDefault( #"scr_napalmSelectorSize", 3000 );
                self beginLocationNapalmSelection( "map_napalm_selector", napalmSelectorSize, "killstreak_napalm" );
                self.selectingLocation = true;
                self waittill( "confirm_location", location, directionYaw );
                NewLoc = BulletTrace( location+(0,0,5000), ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
                self thread maps\mp\_airsupport::endSelectionThink();
                self setOrigin(NewLoc);

how fix this :S
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#4
(04-29-2012, 11:37)CVD Wrote: but now i get this error:

and it works when i use it in _rank.gsc :S

You have to put the #include 's on top of your .gsc
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
Reply

#5
oh sorry I forgot to say thanks Wink it all workedSmile
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#6
(05-05-2012, 16:15)CVD Wrote: oh sorry I forgot to say thanks Wink it all workedSmile

Good to know Smile
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Part of HTML missing Arteq 8 4,519 08-03-2013, 03:55
Last Post: Bandarigoda123
Question pc case alvarogt95 11 5,685 02-13-2012, 21:43
Last Post: d0h!
  Random Case problem Xzite 9 4,417 09-17-2011, 14:54
Last Post: Yamato
Information [News] Activision wins ModernWarfare3.com court case JariZ 8 4,314 09-13-2011, 02:45
Last Post: Killingdyl
  [Request] Can someone explain missing assets? koil 3 2,790 07-25-2011, 11:11
Last Post: Nekochan
  An If statement for a name cervantes 5 2,916 07-18-2011, 08:39
Last Post: rotceh_dnih
  If statement help alistair3149 1 1,575 01-12-2011, 09:20
Last Post: master131

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.