Pomoc u vezi skripte (stari topic izbrisan)

Započeo RavenX, April 13, 2020, 16:32:58 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Problem (error/warning):
C:\Users\Duje\Desktop\Balkan Raven\gamemodes\br-rp.pwn(12811) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Duje\Desktop\Balkan Raven\gamemodes\br-rp.pwn(12811) : warning 215: expression has no effect
C:\Users\Duje\Desktop\Balkan Raven\gamemodes\br-rp.pwn(12812) : warning 209: function "S@@_OnDialogResponse" should return a value
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
1 Error.

Dio skripte:
Pawno Code: [Izaberi]
[pawn
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
   {
      case DIALOG_REGISTER:
      {
         if(!response)
         {
            SCM(playerid, COLOR_RED, "ERROR: {FFFFFF}Morate se registrovati da bi usli na server!");
            Kick(playerid);
         }
         if(response)
         {
            if(!strlen(inputtext))
            {
                    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register","Ukucali ste ne prikladnu lozinku, pokusajte drugu!\nUkucajte ispravnu lozinku da bi ste se registrovali", "Register", "Izadji");
            }
            new INI:File = INI_Open(UserPath(playerid));
            INI_SetTag(File, "data");
               INI_WriteInt(File, "Lozinka", udb_hash(inputtext));
               INI_WriteInt(File, "Novac", 20000);
               INI_WriteInt(File, "Level", 1);
               INI_WriteInt(File, "Respekti", 0);
               INI_WriteInt(File, "Admin", 0);
               INI_WriteInt(File, "Vlasnik", 0);
               INI_WriteInt(File, "Vip", 0);
               INI_WriteInt(File, "Promoter", 0);
               INI_WriteInt(File, "Helper", 0);
               INI_Close(File);
               SetSpawnInfo(playerid, 0, 0, 1219.3243,-1811.7106,16.5938, 0, 0, 0, 0, 0, 0, 0);
               SpawnPlayer(playerid);
             SetPlayerSkin(playerid, 23);
            }
         

      }
      case DIALOG_LOGIN:
      {
            if(!response)
         {
            SCM(playerid, COLOR_RED, "ERROR: {FFFFFF}Morate se login-ati da bi usao na server!");
            Kick(playerid);
         }
         if(response)
         {
             if(udb_hash(inputtext) == PlayerInfo[playerid][pLozinka])
             {
               INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
               SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
               SetSpawnInfo(playerid, 0, 0, 1219.3243,-1811.7106,16.5938, 0, 0, 0, 0, 0, 0, 0);
                  SpawnPlayer(playerid);
                  SetPlayerSkin(playerid, 23);

             }
             else
             {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login","Ukucali ste pogresnu lozinku.\nProbajte ponovo!", "Login", "Izadji");
             }
                return 1;
         }
      }
   return 1;
}]