19.05.2012, 17:12
thnx
if(dialogid == 999)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerScore(playerid) >= 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You chose the Zombie as your class.");
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Zombie Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}Chainsaw", "Play","");
gPlayerClass[playerid] = Zombie;
PickedClass[playerid] = 1;
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 9, 1);
}
}
if(listitem == 1)
{
if(GetPlayerScore(playerid) >= 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
gPlayerClass[playerid] = Human;
PickedClass[playerid] = 1;
RemovePlayerMapIcon(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 12, 250);
GivePlayerWeapon(playerid, 29, 250);
GivePlayerWeapon(playerid, 4, 1);
}
}
return 1;
}
return 1;//line 429
}
return true;
}
I have one error
******.pwn(429) : warning 217: loose indentation pawn Code:
How i can fix this? |
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(96) : warning 217: loose indentation
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(437) : error 001: expected token: ";", but found "return"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(448) : error 035: argument type mismatch (argument 2)
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(449) : error 001: expected token: ";", but found "return"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(461) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(200) : error 017: undefined symbol "stSpawn" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(238) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(238) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(238) : error 004: function "OnPlayerConnect" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(247) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(247) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(247) : error 004: function "OnPlayerDisconnect" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(256) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(256) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(256) : error 004: function "OnPlayerSpawn" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(285) : error 017: undefined symbol "JETROOPER" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(357) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(357) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(357) : error 004: function "OnPlayerDeath" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(359) : error 017: undefined symbol "killerid" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(360) : error 017: undefined symbol "killerid" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(363) : error 017: undefined symbol "killerid" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(364) : error 017: undefined symbol "killerid" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(370) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(370) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(370) : error 004: function "OnVehicleSpawn" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(375) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(375) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(375) : error 004: function "OnVehicleDeath" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(380) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(380) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(380) : error 004: function "OnPlayerText" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(385) : warning 225: unreachable code C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(385) : error 029: invalid expression, assumed zero C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(385) : error 004: function "zcmd_OnPlayerCommandText" is not implemented C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(387) : error 017: undefined symbol "cmdtext" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(397) : error 017: undefined symbol "cmdtext" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(407) : warning 217: loose indentation C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(407) : error 017: undefined symbol "cmdtext" C:\Documents and Settings\Owner\Desktop\karlis red vs blue\red vs bue\gamemodes\army.pwn(415) : error 001: expected token: ";", but found "return" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter RemovePlayerFromVehicle(playerid);//get u off from the hunter } if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra RemovePlayerFromVehicle(playerid);//get u off from the hydra } if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == PILOT && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is Soldier then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Engineer to drive Tank");//messages goes to the player that he can't drive the tank or rhino RemovePlayerFromVehicle(playerid);//get u off from the tank or rhino } if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Pilot to fly Sea Sparrow");//messages goes to the player that he can't drive the tank or sea sparrow RemovePlayerFromVehicle(playerid);//get u off from the sea sparrow } return 1; }
hi bro this is awsome tutorial for class system n its work for me " +REP " but i have a problem i can fly hunter, hydra, sea sparrow n can drive rhino if i have selected solder class can u help me??
my code Code:
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter RemovePlayerFromVehicle(playerid);//get u off from the hunter } if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra RemovePlayerFromVehicle(playerid);//get u off from the hydra } if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == PILOT && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is Soldier then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Engineer to drive Tank");//messages goes to the player that he can't drive the tank or rhino RemovePlayerFromVehicle(playerid);//get u off from the tank or rhino } if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETMASTER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive { SendClientMessage(playerid, COLOR_DARKGREY, "You Need to be a Pilot to fly Sea Sparrow");//messages goes to the player that he can't drive the tank or sea sparrow RemovePlayerFromVehicle(playerid);//get u off from the sea sparrow } return 1; } |