Jerrycan Error
#1

Hello, im trying to make a jerrycan system :P but it gives error, i know the errors but i don't see the fault?

pawn Код:
//Code
pawn Код:
if(Current == JerrycanMenu)
  {
    switch(row)
    {
      case 0: {TogglePlayerControllable(playerid, 1);if(playermoney >= 2){PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+1.0000;GivePlayerMoney(playerid, -2);SendClientMessage(playerid, COLOR_YELLOW,"You bought 1 liter benzine for your jerrycan");}else{SendClientMessage(playerid, COLOR_RED,"You need $2,- dollars in cash to buy 1 liter fuel.");}}
      case 1: {TogglePlayerControllable(playerid, 1);if(playermoney >= 3){PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+2.0000;GivePlayerMoney(playerid, -3);SendClientMessage(playerid, COLOR_YELLOW,"You bought 2 liter benzine for your jerrycan");}else{SendClientMessage(playerid, COLOR_RED,"You need $3,- dollars in cash to buy 2 liter fuel.");}}
      case 2: {TogglePlayerControllable(playerid, 1);if(playermoney >= 4){PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+5.0000;GivePlayerMoney(playerid, -4);SendClientMessage(playerid, COLOR_YELLOW,"You bought 5 liter benzine for your jerrycan");}else{SendClientMessage(playerid, COLOR_RED,"You need $4,- dollars in cash to buy 5 liter fuel.");}}
      case 3: {TogglePlayerControllable(playerid, 1);if(playermoney >= 7){PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+10.0000;GivePlayerMoney(playerid, -7);SendClientMessage(playerid, COLOR_YELLOW,"You bought 10 liter benzine for your jerrycan");}else{SendClientMessage(playerid, COLOR_RED,"You need $7,- dollars in cash to buy 10 liter fuel.");}}
      case 4: {TogglePlayerControllable(playerid, 1);if(playermoney >= 9){PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+15.0000;GivePlayerMoney(playerid, -9);SendClientMessage(playerid, COLOR_YELLOW,"You bought 15 liter benzine for your jerrycan");}else{SendClientMessage(playerid, COLOR_RED,"You need $9,- dollars in cash to buy 15 liter fuel.");}}
      case 5: {TogglePlayerControllable(playerid, 1);if(playermoney >= 12){PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+20.0000;GivePlayerMoney(playerid, -12);SendClientMessage(playerid, COLOR_YELLOW,"You bought 20 liter benzine for your jerrycan");}else{SendClientMessage(playerid, COLOR_RED,"You need $12,- dollars in cash to buy 20 liter fuel.");}}
      case 6: {TogglePlayerControllable(playerid, 1);}
    }
  }
pawn Код:
//Errors
Код:
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(9047) : warning 213: tag mismatch
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(9048) : warning 213: tag mismatch
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(9049) : warning 213: tag mismatch
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(9050) : warning 213: tag mismatch
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(9051) : warning 213: tag mismatch
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(9052) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
Reply
#2

Код:
PlayerInfo[playerid][pJerrycan] = PlayerInfo[playerid][pJerrycan]+?.0000;
Check for being a float or.. stupid way if it is, try to make different 0 number count or wierd values if it seems pawno mistake, if it's not helping return it as it was and reply again, and another thing - why aren't you unpacking it if you have errors?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)