Szerző Téma: Invalid Function  (Megtekintve 2403 alkalommal)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Invalid Function
« Dátum: 2011. augusztus 03. - 15:33:09 »
0 Show voters
Hali Hiba ujra az elõzõ Teleport Scriptemnek a dialogresponse alatti rész az elsõ menü pont még hibátlanul sikerült de a második nem :dialogresponse alatti cuccok :
[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 23)
    {
        if(response)
        {
            if(listitem == 0)ShowPlayerDialog(playerid,24,DIALOG_STYLE_LIST,\"Alap Teleportok\",\"Los Santos\\nSan Fierro\\nLast Venturas\\nArea51\\nSkatePark\\nChilliad\",\"Teleport\",\"Cancel\");
            if(listitem == 1)ShowPlayerDialog(playerid,25,DIALOG_STYLE_LIST,\"Repterek\",\"Los Santos Repülötér\\nSan Fiero Reptér\\nLast Venturas Reptér\\nRégi Reptér\",\"Teleport\",\"Cancel\");
            if(listitem == 2)ShowPlayerDialog(playerid,26,DIALOG_STYLE_LIST,\"Driftek\",\"Drift1\\nDrift2\\nDrift3\\nDrift4\\nDrift5\",\"Teleport\",\"Cancel\");
        }
        return 1;
    }
   if(dialogid == 24)
   {
      if(response == 1)
      {
         switch(listitem)
         {
            case 0:
            {
   new pName[MAX_PLAYER_NAME], string[256];
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid),2496.4656,-1669.8828,13.3359);
    } else {
    SetPlayerPos(playerid,2496.4656,-1669.8828,13.3359);
    }
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), \"[TELE]: %s Los Santos városhoz teleportált!\", pName);
    SendClientMessageToAll(COLOR_GREEN, string);
            }
            case 1: {
               SendClientMessage(playerid, 0x0080FFFF, \"Üdv, a San Fierro városában!\");
    new pName[MAX_PLAYER_NAME], string[256];
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid),-1970.5830,287.8890,35.1719);
    } else {
    SetPlayerPos(playerid,-1970.5830,287.8890,35.1719);
    }
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), \"[TELE]: %s San Fierro-hoz teleportált!\", pName);
    SendClientMessageToAll(COLOR_GREEN, string);
            }
            case 2: {
    new pName[MAX_PLAYER_NAME], string[256];
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid),2086.6035,1683.4514,10.8203);
    } else {
    SetPlayerPos(playerid,2086.6035,1683.4514,10.8203);
    }
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), \"[TELE]: %s Las Venturas-hoz teleportált! \", pName);
    SendClientMessageToAll(COLOR_GREEN, string);
    }
    case 3: {
        new pName[MAX_PLAYER_NAME], string[256];
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid), 201.9920,1897.7946,17.6406);
    } else {
    SetPlayerPos(playerid, 201.9920,1897.7946,17.6406);
    }
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), \"[TELE]: %s area 51 hez teleportált! \", pName);
    SendClientMessageToAll(COLOR_GREEN, string);
            }
     case 4:{
    new pName[MAX_PLAYER_NAME], string[256];
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid), 1914.2083,-1441.6256,13.5225);
    } else {
    SetPlayerPos(playerid, 1914.2083,-1441.6256,13.5225);
    }
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), \"[TELE]: %s skateparkhoz teleportált! \", pName);
    SendClientMessageToAll(COLOR_GREEN, string);
    }
    case 5: {
        new pName[MAX_PLAYER_NAME], string[256];
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid),-2305.4172,-1656.9608,483.6725);
    } else {
    SetPlayerPos(playerid,-2305.4172,-1656.9608,483.6725);
    }
    SetPlayerInterior(playerid, 0);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), \"[TELE]: %s Mount Chilliad-ra teleportált!\", pName);
    SendClientMessageToAll(COLOR_GREEN, string);
    }
        }
      }
   }
   return 1;
}
 if(dialogid == 25)
   {
      if(response == 1)
      {
         switch(listitem)
         {
            case 0:
            {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),1412.8171,-2435.1362,13.5766);
    } else {
    SetPlayerPos(playerid,1412.8171,-2435.1362,13.5766);
    SetPlayerInterior(playerid, 0);
    }
case 1:
{
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),-1567.6731,-179.2296,14.1484);;
    } else {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484);
    }
    case 2:
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),1529.6984,1799.4802,10.8344);
    } else {
    SetPlayerPos(playerid,1529.6984,1799.4802,10.8344);
    SetPlayerInterior(playerid, 0);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
    case 3:
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(GetPlayerVehicleID(playerid),373.8240,2472.2849,16.4844);
    } else {
    SetPlayerPos(playerid,373.8240,2472.2849,16.4844);
    }
    SetPlayerInterior(playerid, 0);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
        }
      }
   }
   return 1;
}
if(dialogid == 26)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),-330.3562,1529.4213,75.3594);
    } else {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-330.3562,1529.4213,75.3594);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
case 1:
{
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),2286.1074,1390.0565,43);
    } else {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,2286.1074,1390.0565,43);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
case 2:
{
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),-2409.4253,-600.0413,132.5273);
    } else {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-2409.4253,-600.0413,132.5273);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
case 3:
{
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),-2117.6387,-762.7694,32.0234);
    } else {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-2117.6387,-762.7694,32.0234);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
case 4:
{
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetPlayerInterior(playerid, 0);
    SetVehiclePos(GetPlayerVehicleID(playerid),1610.1160,-1541.4785,13.3179);
    } else {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,1610.1160,-1541.4785,13.3179);
    SetPlayerFacingAngle(playerid, 301.5956);
    }
        }
      }
   }
   return 0;
}[/pawn]
26 ERROR:
 
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(500) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(502) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(504) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(506) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(508) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(512) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(516) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(518) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(522) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(526) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(528) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(532) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(537) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(539) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(542) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(551) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(553) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(555) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(557) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(559) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(561) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(565) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(570) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(572) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(576) : error 010: invalid function or declaration
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(581) : error 010: invalid function or declaration
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
 
26 Errors.

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Invalid Function
« Válasz #1 Dátum: 2011. augusztus 03. - 16:44:12 »
+1 Show voters
Próbáld így : Nem biztos hogy jó :)
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 23)
    {
        if(response)
        {
            if(listitem == 0)ShowPlayerDialog(playerid,24,DIALOG_STYLE_LIST,\"Alap Teleportok\",\"Los Santos\\nSan Fierro\\nLast Venturas\\nArea51\\nSkatePark\\nChilliad\",\"Teleport\",\"Cancel\");
            if(listitem == 1)ShowPlayerDialog(playerid,25,DIALOG_STYLE_LIST,\"Repterek\",\"Los Santos Repülötér\\nSan Fiero Reptér\\nLast Venturas Reptér\\nRégi Reptér\",\"Teleport\",\"Cancel\");
            if(listitem == 2)ShowPlayerDialog(playerid,26,DIALOG_STYLE_LIST,\"Driftek\",\"Drift1\\nDrift2\\nDrift3\\nDrift4\\nDrift5\",\"Teleport\",\"Cancel\");
        }
        return 1;
    }
if(dialogid == 24)
      {
      if(response == 1)
      {
         switch(listitem)
         {
            case 0:
            {
         new pName[MAX_PLAYER_NAME], string[256];
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetVehiclePos(GetPlayerVehicleID(playerid),2496.4656,-1669.8828,13.3359);
       } else {
       SetPlayerPos(playerid,2496.4656,-1669.8828,13.3359);
       }
       SetPlayerInterior(playerid, 0);
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), \"[TELE]: %s Los Santos városhoz teleportált!\", pName);
       SendClientMessageToAll(COLOR_GREEN, string);
            }
            case 1:
   {
                  SendClientMessage(playerid, 0x0080FFFF, \"Üdv, a San Fierro városában!\");
             new pName[MAX_PLAYER_NAME], string[256];
             if(IsPlayerInAnyVehicle(playerid))
             {
             SetVehiclePos(GetPlayerVehicleID(playerid),-1970.5830,287.8890,35.1719);
             } else {
             SetPlayerPos(playerid,-1970.5830,287.8890,35.1719);
             }
             SetPlayerInterior(playerid, 0);
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), \"[TELE]: %s San Fierro-hoz teleportált!\", pName);
       SendClientMessageToAll(COLOR_GREEN, string);
            }
            case 2:
   {
       new pName[MAX_PLAYER_NAME], string[256];
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetVehiclePos(GetPlayerVehicleID(playerid),2086.6035,1683.4514,10.8203);
       } else {
       SetPlayerPos(playerid,2086.6035,1683.4514,10.8203);
       }
       SetPlayerInterior(playerid, 0);
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), \"[TELE]: %s Las Venturas-hoz teleportált! \", pName);
       SendClientMessageToAll(COLOR_GREEN, string);
          }
          case 3:
   {
        new pName[MAX_PLAYER_NAME], string[256];
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetVehiclePos(GetPlayerVehicleID(playerid), 201.9920,1897.7946,17.6406);
       } else {
       SetPlayerPos(playerid, 201.9920,1897.7946,17.6406);
       }
       SetPlayerInterior(playerid, 0);
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), \"[TELE]: %s area 51 hez teleportált! \", pName);
       SendClientMessageToAll(COLOR_GREEN, string);
             }
           case 4:
   {
       new pName[MAX_PLAYER_NAME], string[256];
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetVehiclePos(GetPlayerVehicleID(playerid), 1914.2083,-1441.6256,13.5225);
       } else {
       SetPlayerPos(playerid, 1914.2083,-1441.6256,13.5225);
       }
       SetPlayerInterior(playerid, 0);
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), \"[TELE]: %s skateparkhoz teleportált! \", pName);
       SendClientMessageToAll(COLOR_GREEN, string);
          }
          case 5:
       {
        new pName[MAX_PLAYER_NAME], string[256];
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetVehiclePos(GetPlayerVehicleID(playerid),-2305.4172,-1656.9608,483.6725);
       } else {
       SetPlayerPos(playerid,-2305.4172,-1656.9608,483.6725);
       }
       SetPlayerInterior(playerid, 0);
       GetPlayerName(playerid, pName, sizeof(pName));
       format(string, sizeof(string), \"[TELE]: %s Mount Chilliad-ra teleportált!\", pName);
       SendClientMessageToAll(COLOR_GREEN, string);
          }
         }
    }
return 1;
}
if(dialogid == 25)
      {
      if(response == 1)
      {
         switch(listitem)
         {
            case 0:
            {
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetPlayerInterior(playerid, 0);
       SetVehiclePos(GetPlayerVehicleID(playerid),1412.8171,-2435.1362,13.5766);
       } else {
       SetPlayerPos(playerid,1412.8171,-2435.1362,13.5766);
       SetPlayerInterior(playerid, 0);
          }
   case 1:
   {
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetPlayerInterior(playerid, 0);
       SetVehiclePos(GetPlayerVehicleID(playerid),-1567.6731,-179.2296,14.1484);;
       } else {
       SetPlayerInterior(playerid, 0);
       SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484);
            }
          case 2:
    {
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetPlayerInterior(playerid, 0);
       SetVehiclePos(GetPlayerVehicleID(playerid),1529.6984,1799.4802,10.8344);
       } else {
       SetPlayerPos(playerid,1529.6984,1799.4802,10.8344);
       SetPlayerInterior(playerid, 0);
       SetPlayerFacingAngle(playerid, 301.5956);
          }
          case 3:
          {
       if(IsPlayerInAnyVehicle(playerid))
       {
       SetVehiclePos(GetPlayerVehicleID(playerid),373.8240,2472.2849,16.4844);
       } else {
       SetPlayerPos(playerid,373.8240,2472.2849,16.4844);
       }
       SetPlayerInterior(playerid, 0);
       SetPlayerFacingAngle(playerid, 301.5956);
            }
         }
}
     return 1;
}
   
if(dialogid == 26)
{
if(response == 1)
{
   switch(listitem)
   {
      case 0:
      {
         if(IsPlayerInAnyVehicle(playerid))
          {
          SetPlayerInterior(playerid, 0);
          SetVehiclePos(GetPlayerVehicleID(playerid),-330.3562,1529.4213,75.3594);
          } else {
          SetPlayerInterior(playerid, 0);
          SetPlayerPos(playerid,-330.3562,1529.4213,75.3594);
          SetPlayerFacingAngle(playerid, 301.5956);
             }
      case 1:
      {
          if(IsPlayerInAnyVehicle(playerid))
          {
          SetPlayerInterior(playerid, 0);
          SetVehiclePos(GetPlayerVehicleID(playerid),2286.1074,1390.0565,43);
          } else {
          SetPlayerInterior(playerid, 0);
          SetPlayerPos(playerid,2286.1074,1390.0565,43);
          SetPlayerFacingAngle(playerid, 301.5956);
             }
      case 2:
      {
          if(IsPlayerInAnyVehicle(playerid))
          {
          SetPlayerInterior(playerid, 0);
          SetVehiclePos(GetPlayerVehicleID(playerid),-2409.4253,-600.0413,132.5273);
          } else {
          SetPlayerInterior(playerid, 0);
          SetPlayerPos(playerid,-2409.4253,-600.0413,132.5273);
          SetPlayerFacingAngle(playerid, 301.5956);
             }
      case 3:
      {
          if(IsPlayerInAnyVehicle(playerid))
          {
          SetPlayerInterior(playerid, 0);
          SetVehiclePos(GetPlayerVehicleID(playerid),-2117.6387,-762.7694,32.0234);
          } else {
          SetPlayerInterior(playerid, 0);
          SetPlayerPos(playerid,-2117.6387,-762.7694,32.0234);
          SetPlayerFacingAngle(playerid, 301.5956);
             }
      case 4:
      {
          if(IsPlayerInAnyVehicle(playerid))
          {
          SetPlayerInterior(playerid, 0);
          SetVehiclePos(GetPlayerVehicleID(playerid),1610.1160,-1541.4785,13.3179);
          } else {
          SetPlayerInterior(playerid, 0);
          SetPlayerPos(playerid,1610.1160,-1541.4785,13.3179);
          SetPlayerFacingAngle(playerid, 301.5956);
             }
   }
}
}
return 0;
}

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Invalid Function
« Válasz #2 Dátum: 2011. augusztus 03. - 16:53:13 »
0 Show voters
van még 4 error
errorok:
 
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(521) : error 014: invalid statement; not in switch
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(521) : warning 215: expression has no effect
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(521) : error 001: expected token: \";\", but found \":\"
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(521) : error 029: invalid expression, assumed zero
C:\\Documents and Settings\\Penge\\Dokumentumok\\Untitled.pwn(521) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
 
4 Errors.

 
SOR:
[pawn]   case 1:
         {
             if(IsPlayerInAnyVehicle(playerid))
             {
             SetPlayerInterior(playerid, 0);
             SetVehiclePos(GetPlayerVehicleID(playerid),-1567.6731,-179.2296,14.1484);
             } else {
             SetPlayerInterior(playerid, 0);
             SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484);
            }[/pawn]

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Invalid Function
« Válasz #3 Dátum: 2011. augusztus 03. - 16:58:36 »
0 Show voters
case 1:

 
evvel mi a probléma ??? hm....

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Invalid Function
« Válasz #4 Dátum: 2011. augusztus 03. - 16:59:34 »
0 Show voters
nem tom arra érzékeli

Invalid Function
« Válasz #5 Dátum: 2011. augusztus 03. - 17:02:40 »
0 Show voters
a case-k elé kell egy switch is.
[pawn]switch(dialogid)// vagy ami itt van
{
    case 1: ...
    case 2: stb
}[/pawn]

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Invalid Function
« Válasz #6 Dátum: 2011. augusztus 03. - 17:13:23 »
0 Show voters
De elõtte ott van
 
if(response == 1)
      {
         switch(listitem)
         {
            case 0:
            {
            //stb.....

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal