Pawno crash with this code.
#1

^^^
pawn Код:
new SpawnPOINT[500];
    switch(Spawnpoint[playerid])
    {
      case 0: SpawnPOINT = "{00CCFF}Base";
      case 1: SpawnPOINT = "{00CCFF}Area51";
      case 2: SpawnPOINT = "{00CCFF}Desert Airport";
      case 3: SpawnPOINT = "{00CCFF}Big Ear";
      case 4: SpawnPOINT = "{00CCFF}Army Town";
      case 5: SpawnPOINT = "{00CCFF}The Mall;
      case 6: SpawnPOINT = "
{00CCFF}Old Village";
      case 7: SpawnPOINT = "
{00CCFF}Hospital";
      case 8: SpawnPOINT = "
{00CCFF}Gas Ship";
    }
Reply
#2

500 cells? That's an awful amount of waste. Try reducing the size of the SpawnPOINT array. 40 should be more than enough. If you're not going to add more to the list, actually 23 would be the appropriate amount of cells
pawn Код:
new
    SpawnPOINT[ 23 ];
Reply
#3

Still crashing ..
Reply
#4

Just look at how the forum highlights your code. Pretty obvious, really.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
Just look at how the forum highlights your code. Pretty obvious, really.
I am thinking the same..
i've re-script everything..
pawn Код:
switch(Spawnpoint[playerid])
{
       case 0: SpawnPOINT = "{00CCFF}Base";
       case 1: SpawnPOINT = "{00CCFF}Area 51";
       case 2: SpawnPOINT = "{00CCFF}Desert Airport;
       case 3: SpawnPOINT = "
{00CCFF}Big Ear";
       case 4: SpawnPOINT = "
{00CCFF}Army Town";
       case 5: SpawnPOINT = "
{00CCFF}The Mall";
       case 6: SpawnPOINT = "
{00CCFF}Old Village";
       case 7: SpawnPOINT = "
{00CCFF}Hospital";
       case 8: SpawnPOINT = "
{00CCFF}Gas ship";
}
But still same

Maybe from this code?
because when i remove these lines i can compile fine.
pawn Код:
new teamrank[350];
    new classrank2[350];
    new SpawnPOINT[350];
    new RankType2[350];
    switch(gTeam[playerid])
    {
       case 1: teamrank = "Usa Army | Bouns: "#USA_BOUNS" Armour.";
       case 2: teamrank = "European Masters | Bouns: "#EURO_BOUNS" Armour."";
       case 3: teamrank = "Arabian invasion | Bouns: "#ARAB_BOUNS" Armour."";
       case 4: teamrank = "Australia Killers | Bouns: "#AUST_BOUNS" Armour."";
       case 5: teamrank = "Russian Force | Bouns: "#RUS_BOUNS" Armour."";
       case 6: teamrank = "Mercenary | Bouns: "#MERC_BOUNS" Armour."";
       case 7: teamrank = "Admin | Bouns: None.";
    }
    switch(gClass[playerid])
    {
       case 1: classrank2 = "Assault | Bouns: Drive heavy vehicles, Great class for fighting.";
       case 4: classrank2 = "Airman | Bouns: Fly heavy vehicles";
       case 2: classrank2 = "Sniper | Bouns: Invisible on the map";
       case 6: classrank2 = "Undercover | Bouns: Strong class to fight.";
       case 7: classrank2 = "Pro Assault | Bouns: Heavy weapons.";
       case 5: classrank2 = "Repair Man | Bouns: Drive heavy vehicles, heavy weapons.";
       case 3: classrank2 = "Jet-Hander | Bouns: can spawn jetpack using /jet.";
       case 8: classrank2 = "Donor | Bouns: every class bouns expect the undercover one.";
       case 9: classrank2 = "Fire man | Bouns: Heavy weapons";
       case 10: classrank2 = "Doctor | Bouns: Can heal team mates using /heal.";
    }
    switch(LVL[playerid])
    {
           case 0: RankType2 = "Rookie [0]";
           case 1: RankType2 = "Private [1]";
           case 2: RankType2 = "Corporal [2]";
           case 3: RankType2 = "Sergeant [3]";
           case 4: RankType2 = "Officer [4]";
           case 5: RankType2 = "Lietenaunt [5]";
           case 6: RankType2 = "Commander [6]";
           case 7: RankType2 = "Captain [7]";
           case 8: RankType2 = "Major [8]";
           case 9: RankType2 = "Colonel [9]";
           case 10:RankType2 = "General [10]";
           case 11:RankType2 = "Super General [11]";
           case 12:RankType2 = "Master Of War[12]";
    }
      // 0 - base \ 1 - area 51 \ 2 - DA \ 3 - Big ear \ 4 - Army Town \ 5 The Mall \ 6 - Old Village \ 7 Hospital \ Gas Ship
    switch(Spawnpoint[playerid])
    {
       case 0: SpawnPOINT = "{00CCFF}Base";
       case 1: SpawnPOINT = "{00CCFF}Area 51";
       case 2: SpawnPOINT = "{00CCFF}Desert Airport;
       case 3: SpawnPOINT = "
{00CCFF}Big Ear";
       case 4: SpawnPOINT = "
{00CCFF}Army Town";
       case 5: SpawnPOINT = "
{00CCFF}The Mall";
       case 6: SpawnPOINT = "
{00CCFF}Old Village";
       case 7: SpawnPOINT = "
{00CCFF}Hospital";
       case 8: SpawnPOINT = "
{00CCFF}Gas ship";
    }
Reply
#6

Ah yes I was blind.
Vince is right. If you look at "case 3:" it's black, not blue. If you then investigate on the line above, you can see that you're missing a quotation mark after "Desert Airport".
Reply
#7

pawn Код:
case 5: SpawnPOINT = "{00CCFF}The Mall;
is missing a " at the end.
so it should be
pawn Код:
case 5: SpawnPOINT = "{00CCFF}The Mall";
Reply
#8

So it must be:
pawn Код:
switch(Spawnpoint[playerid])
{
       case 0: SpawnPOINT = "{00CCFF}Base";
       case 1: SpawnPOINT = "{00CCFF}Area 51";
       case 2: SpawnPOINT = "{00CCFF}Desert Airport";
       case 3: SpawnPOINT = "{00CCFF}Big Ear";
       case 4: SpawnPOINT = "{00CCFF}Army Town";
       case 5: SpawnPOINT = "{00CCFF}The Mall";
       case 6: SpawnPOINT = "{00CCFF}Old Village";
       case 7: SpawnPOINT = "{00CCFF}Hospital";
       case 8: SpawnPOINT = "{00CCFF}Gas ship";
}
Reply
#9

Late reply.
fixed, thanks guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)