Lots of general errors
#1

Hello, i have a problem with this dialog code, if i compile it i get lots of general errors not releated to the code, but if i remove it and re-compile, the gamemode gets compiled without errors, so i think the problem is in the code:

pawn Код:
if(dialogid == DIALOG_SKILLS) //Skills
            {
            if(response)
            {
            if(listitem == 0) //Medic
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Medic.");
                pInfo[playerid][Skill] = 1;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Medic.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Medic.");
            }
            }
            }

            if(listitem == 1) //Bomber
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Bomber.");
                pInfo[playerid][Skill] = 2;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Bomber.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Bomber.");
            }
            }

            if(listitem == 2) //Normal Civilian
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Normal Civilian.");
                pInfo[playerid][Skill] = 3;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Normal Civilian.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Normal Civilian.");
            }
            }
            }

            if(listitem == 3) //Drug Dealer
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Drug Dealer.");
                pInfo[playerid][Skill] = 4;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Drug Dealer.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Drug Dealer.");
            }
            }

            if(listitem == 4) //Robber
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Robber.");
                pInfo[playerid][Skill] = 5;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Robber.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Robber.");
            }
            }
            }

            if(listitem == 5) //Rapist
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Rapist.");
                pInfo[playerid][Skill] = 6;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Rapist.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Rapist.");
            }
            }
            }

            if(listitem == 6) //Carjacker
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Carjacker.");
                pInfo[playerid][Skill] = 7;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Carjacker.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Carjacker.");
            }
            }
            }

            if(listitem == 7) //Fisherman
            {
            if (GetPlayerMoney(playerid) < 25000)
            {
                 SCM(playerid, 0xFFFFFF, "You need 25.000 CSCash to change your skill.");
            }
            else if(GetPlayerMoney(playerid) > 25000)
            {
                if(GetPVarInt(playerid,"SkillChangeTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait 30 minutes before changing skill again.");
                SCM(playerid, -1, "{FFFFFF}You are now a {F70505}Fisherman.");
                pInfo[playerid][Skill] = 8;
                GivePlayerMoney(playerid,-25000);
                new Year, Month, Day, Hour, Minute, Second;
                getdate(Year, Month, Day);
                gettime(Hour, Minute, Second);
                new pname[MAX_PLAYER_NAME];
                new ok[128];
                GetPlayerName(playerid, pname, 24);
                format(ok, sizeof(ok), "1,7%s (%d) is now a Fisherman.", pname,playerid);
                IRC_Say(gGroupID, IRC_CHANNEL, ok);
                SetPVarInt(playerid,"SkillChangeTime",GetTickCount()+1800000);
                SCM(playerid, 0xFFFFFF, "You changed your skill to Fisherman.");
            }
            }
            return 1;
            }
Whats wrong?
Reply


Messages In This Thread
Lots of general errors - by Face9000 - 10.04.2013, 12:08
Re: Lots of general errors - by Riddick94 - 10.04.2013, 12:13
Re: Lots of general errors - by Faisal_khan - 10.04.2013, 12:16
Re: Lots of general errors - by iJumbo - 10.04.2013, 12:17
Re: Lots of general errors - by Faisal_khan - 10.04.2013, 12:21
Re: Lots of general errors - by Face9000 - 10.04.2013, 12:30

Forum Jump:


Users browsing this thread: 1 Guest(s)