O_O WTF check this
#1

The Error Start From if(dialogid == cskill) to end of him


I have do at top of script

#define reg 1
#define log 2
#define greatz 3
#define cskill 4

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == reg)
    {
        if(!
strlen(inputtext)){
         
ShowPlayerDialog(playerid,reg,DIALOG_STYLE_INPUT,"Registration","ERROR: You did not enter a password.\nPlease enter a password below to register this account!","Register","Leave");
         return 
1;
         }
        if(
strlen(inputtext) < 5){
        
SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Password must be than 5 characters");
        return 
1;
        }
        if(
response==0){
         
Kick(playerid);
         return 
1;
         }
          if (
udb_Create(PlayerName(playerid),inputtext)){
          new 
playerip[20];
        
GetPlayerIp(playeridplayeripsizeof(playerip));
        
dUserSet(PlayerName(playerid)).("Ip"playerip);
        
dUserSetINT(PlayerName(playerid)).("money",7500);
        
dUserSetINT(PlayerName(playerid)).("bankcash",5000);
        
dUserSetINT(PlayerName(playerid)).("loancash",0);
        
dUserSetINT(PlayerName(playerid)).("cashinsured",0);
        
dUserSetINT(PlayerName(playerid)).("autobahnowner",0);
        
dUserSetINT(PlayerName(playerid)).("regplayer",0);
        
dUserSetINT(PlayerName(playerid)).("carwinner",0);
        
dUserSetINT(PlayerName(playerid)).("score",0);
        
dUserSetINT(PlayerName(playerid)).("team",0);
        
dUserSetINT(PlayerName(playerid)).("skin",0);
        
dUserSetINT(PlayerName(playerid)).("jailtime",0);
        
dUserSetINT(PlayerName(playerid)).("wallet",0);
        
dUserSetINT(PlayerName(playerid)).("drugs",0);
        
dUserSetINT(PlayerName(playerid)).("drugbagy",0);
        
dUserSetINT(PlayerName(playerid)).("adminlevel",0);
        
dUserSetINT(PlayerName(playerid)).("teamkills",0);
        
dUserSetINT(PlayerName(playerid)).("innocentkills",0);
        
dUserSetINT(PlayerName(playerid)).("lowwantedkills",0);
        
dUserSetINT(PlayerName(playerid)).("coprank",0);
        
dUserSetINT(PlayerName(playerid)).("robrank",0);
        
dUserSetINT(PlayerName(playerid)).("warns",0);
        
dUserSetINT(PlayerName(playerid)).("deaths",0);
        
dUserSetINT(PlayerName(playerid)).("casinorob",0);
        
dUserSetINT(PlayerName(playerid)).("cashfromcasninorob",0);
        
dUserSetINT(PlayerName(playerid)).("atmsrobbed",0);
        
dUserSetINT(PlayerName(playerid)).("cashfromatmsrobbed",0);
        
dUserSetINT(PlayerName(playerid)).("crimsarrested",0);
        
dUserSetINT(PlayerName(playerid)).("timesarrested",0);
        
dUserSetINT(PlayerName(playerid)).("totaljailtime",0);
        
dUserSetINT(PlayerName(playerid)).("timesparoled",0);
        
dUserSetINT(PlayerName(playerid)).("finesissued",0);
        
dUserSetINT(PlayerName(playerid)).("finespaid",0);
        
dUserSetINT(PlayerName(playerid)).("nameban",0);
        
dUserSetINT(PlayerName(playerid)).("timesinfected",0);
        
dUserSetINT(PlayerName(playerid)).("timesraped",0);
        
dUserSetINT(PlayerName(playerid)).("timesrobbed",0);
        
dUserSetINT(PlayerName(playerid)).("timeshealed",0);
        
dUserSetINT(PlayerName(playerid)).("timescured",0);
        
dUserSetINT(PlayerName(playerid)).("hitsplaced",0);
        
dUserSetINT(PlayerName(playerid)).("hitsplacedonyou",0);
        
dUserSetINT(PlayerName(playerid)).("timessearched",0);
        
dUserSetINT(PlayerName(playerid)).("drugssiezedbycops",0);
        
dUserSetINT(PlayerName(playerid)).("canusearmy",0);
        
dUserSetINT(PlayerName(playerid)).("connectedminute",0);
        
dUserSetINT(PlayerName(playerid)).("connectedhour",0);
        
dUserSetINT(PlayerName(playerid)).("timesfuckedoff",0);
        
dUserSetINT(PlayerName(playerid)).("storesrobbed",0);
        
dUserSetINT(PlayerName(playerid)).("cashfromstorerob",0);
        
dUserSetINT(PlayerName(playerid)).("RegularPlayer",0);
        
dUserSetINT(PlayerName(playerid)).("AirPortOwner",0);
        
dUserSetINT(PlayerName(playerid)).("DrugHouseOwner",0);
        
dUserSetINT(PlayerName(playerid)).("HasDrugHouseKeys",0);
        
dUserSetINT(PlayerName(playerid)).("IsOwner",0);
         
SendClientMessage(playerid,COLOR_GREEN,"Congrataletion You Have Create Your Account Good Luck In Our Server");
        }
    }
    if(
dialogid == log)
    {
        if(!
strlen(inputtext)){
        
ShowPlayerDialog(playerid,log,DIALOG_STYLE_INPUT,"Login","ERROR: You did not enter a password.\nPlease enter a password below to login to this account!","Register","Leave");
        return 
1;
        }
        if(
response==0){
        
Kick(playerid);
        return 
1;
        }
          if (
udb_CheckLogin(PlayerName(playerid),inputtext)) {
        
       
// Following thing is the same like the missing SetPlayerCommand
        
GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));
        
SetPlayerScore(playerid,dUserINT(PlayerName(playerid)).("score")-GetPlayerScore(playerid));
        
robberrank[playerid] =dUserINT(PlayerName(playerid)).("robrank");
        
teamkiller[playerid] =dUserINT(PlayerName(playerid)).("teamkills");
        
innocentkiller[playerid] =dUserINT(PlayerName(playerid)).("innocentkills");
        
lowwantedkiller[playerid] =dUserINT(PlayerName(playerid)).("lowwantedkills");
        
BankRobInsurance[playerid] =dUserINT(PlayerName(playerid)).("cashinsured");
        
CanUseArmy[playerid] =dUserINT(PlayerName(playerid)).("canusearmy");
        
PlayerAdminLevel[playerid] =dUserINT(PlayerName(playerid)).("adminlevel");
        
RegularPlayer[playerid] =dUserINT(PlayerName(playerid)).("RegularPlayer");
        
HasDrugHouseKeys[playerid] =dUserINT(PlayerName(playerid)).("HasDrugHouseKeys");
        
IsOwner[playerid] =dUserINT(PlayerName(playerid)).("IsOwner");
        
PLAYERLIST_authed[playerid]=true;
        
SendClientMessage(playeridCOLOR_GREEN"You have Successfuly Logged Into This Account!");
        } else return 
ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"Login","ERROR: Invalid Password.\nPlease enter a password to login to this account!","Login","Quit");
    }
    return 
1;
}
    if(
dialogid == cskill)
    {
        if(
response == 0){ return SendClientMessage(playerid,COLOR_RED,"You Become Rapist Beacuse You Dont Choose Your Skill You Click Cancel");
        
GivePlayerWeapon(playerid,5,1);
        
GivePlayerWeapon(playerid,22,100);
        
GivePlayerWeapon(playerid,14,1);
        
gTeam[playerid] = TEAM_RAPIST;
        
SetPlayerToTeamColour(playerid);
        
canchooseskill[playerid] =0;
        return 
1;
        }
        switch(
listitem)
        {
            case 
0:{
            
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
            
SendClientMessage(playerid,0x1E90FFAA"RAPIST: You can rape other players and infect them with STDs that could kill them");
            
GivePlayerWeapon(playerid,5,1);
            
GivePlayerWeapon(playerid,22,100);
            
GivePlayerWeapon(playerid,14,1);
            
gTeam[playerid] = TEAM_RAPIST;
            
SetPlayerToTeamColour(playerid);
            
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
1:{
             
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
              
SendClientMessage(playerid,0x00FFFFAA"DRUG DEALER: You will supply people with drugs for a price. Dont let people rip you off..");
               
SendClientMessage(playerid,0x00FFFFAA"Keep a watch on the chat for players wanting drugs. Visit the drug house to replenish your stock");
            
GivePlayerWeapon(playerid,25,50);
            
GivePlayerWeapon(playerid,28,100);
            
GivePlayerWeapon(playerid,5,1);
            
gTeam[playerid] = TEAM_DRGDEL;
            
SetPlayerToTeamColour(playerid);
            
PlayerDrugs[playerid] = 500;
            
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
2:{
              
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
            
SendClientMessage(playerid,0x00FFFFAA"GUN DEALER: If anyone needs weapons then you sell them some lead. Your prices are set by the game");
             
SendClientMessage(playerid,0x00FFFFAA"You can also deliver guns to ammunations");
              
GivePlayerWeapon(playerid,29,500);
               
GivePlayerWeapon(playerid,30,50);
               
gTeam[playerid] = TEAM_GUNDEL;
            
SetPlayerToTeamColour(playerid);
            
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
3:{
             
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
               
SendClientMessage(playerid,0x00FFFFAA"HITMAN: If anyone needs another player dead then they will contact you. Make sure you agree a price and get paid");
               
SendClientMessage(playerid,0x00FFFFAA"Type /hits to see if there are any hit contracts available");
               
GivePlayerWeapon(playerid,27,250);
               
GivePlayerWeapon(playerid,23,100);
               
GivePlayerWeapon(playerid,31,250);
               
gTeam[playerid] = TEAM_HITMAN;
               
SetPlayerToTeamColour(playerid);
               
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
4:{
            {
             
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
              
SendClientMessage(playerid,0x00FFFFAA"PRIVATE MEDIC: If anyone needs medical attention for cuts and bruses or STDs then you can cure then and heal them");
            
SendClientMessage(playerid,0x00FFFFAA"You can also infect them with STDs that could kill them DO NOT HIT/INFECT THEM JUST TO HEAL/CURE THEM");
            
GivePlayerWeapon(playerid,22,250);
            
gTeam[playerid] = TEAM_PVTMED;
            
SetPlayerToTeamColour(playerid);
            
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
5:{
              {
             
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
            
SendClientMessage(playerid,0x00FFFFAA"BOUNTY HUNTER: You have to help the cops take Escaped prisoners back into custody");
            
SendClientMessage(playerid,0x00FFFFAA"Simply target RED players and type /ar (id) next to them to see if you have found an escaped convict");
             
SendClientMessage(playerid,0x00FFFFAA"Type /bounty for details of Escaped Prisoners");
               
GivePlayerWeapon(playerid,27,250);
            
GivePlayerWeapon(playerid,23,100);
                
GivePlayerWeapon(playerid,31,250);
              
gTeam[playerid] = TEAM_BOUNTY;
              
SetPlayerToTeamColour(playerid);
            
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
6:{
            {
               
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands.");
            
SendClientMessage(playerid,0x00FFFFAA"Kidnapper: You have to get a passenger in your car.");
            
SendClientMessage(playerid,0x00FFFFAA"Tie them up using /tie, and then drive to a location which is out");
            
SendClientMessage(playerid,0x00FFFFAA"of the way and proceed to do what you wish.");
            
GivePlayerWeapon(playerid,26,40);
            
GivePlayerWeapon(playerid,32,200);
            
GivePlayerWeapon(playerid,22,200);
            
gTeam[playerid] = TEAM_KIDNAP;
            
SetPlayerToTeamColour(playerid);
            
canchooseskill[playerid] =0;
            return 
1;
            }
            case 
7:{
            {
              
SendClientMessage(playerid,0x1E90FFAA"Type /commands for your commands");
            
SendClientMessage(playerid,0x00FFFFAA"Pilot: You are a plane driver");
             
SendClientMessage(playerid,0x00FFFFAA"If a player orders a private plane you can be the driver");
              
GivePlayerWeapon(playerid,5,1);
            
GivePlayerWeapon(playerid,22,100);
            
GivePlayerWeapon(playerid,14,1);
            
gTeam[playerid] = TEAM_PILOT;
            
SetPlayerToTeamColour(playerid);
            
canchooseskill[playerid] =0;
            return 
1;
            }
            return 
1;
            } 
Код:
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4855) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4857) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4863) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4864) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4866) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4868) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4876) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4877) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4879) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4888) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4890) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4892) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4900) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4901) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4903) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4912) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4913) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4915) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4923) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4924) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4926) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4937) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4938) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4940) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4951) : error 010: invalid function or declaration
C:\Documents and Settings\LoL\Desktop\lvrcr\gamemodes\lvrcr.pwn(4952) : error 010: invalid function or declaration
Reply
#2

If your code was properly indented you would notice an out of place opening brace on the line which checks the expression of the dialogid against the value of "cskill".
Reply
#3

The greatest tool of all indenting times, i present: Tidypawn!!
Reply
#4

You closed the callback and after put if(dialogid == cskill).

It must be within the callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)