Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Dodo_Shadow poslato April 22, 2012, 19:23:47 POSLE PODNE

Naslov: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 19:23:47 POSLE PODNE
Skripta koju koristim:CLRP
Detaljan opis problema:napravim Fs za osobna vozila(za jedno)i izbaci mi 1 eror a neznam kak ga maknut
Dio skripte:

Citat
#include <a_samp>

new privatecar;

public OnFilterScriptInit()
{
     privatecar = CreateVehicle(470,1766.0599,-1894.9680,13.5602,359.9476,0,0);
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
   
    if(newstate == PLAYER_STATE_DRIVER)
    {
         if(strcmp(GetName(playerid), "Dominik_Buljan",true) == 0)
         {
              if(vehicleid == privatecar)
           {
               return 1;
           }
           else
           {
          RemovePlayerFromVehicle(playerid);
           }
       }
     
   }
   return 1;
}

stock Getname(Playerid)
{
    new name(MAX_PLAYER_NAME);
    GetPlayerName(playerid, name, sizeof name);
    return name;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://www.youtube.com/watch?v=X9Rvj_NufhY&context=C4484fd0ADvjVQa1PpcFOOAVZIwOe_6OKIe2FLOvTHPJ7bt5TW2zg=



     
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Crazyn3ss poslato April 22, 2012, 19:26:15 POSLE PODNE
bolje pogledaj kako si definiso getname a kako si oznacio :D

stock Getname

a koristis ga GetName

samo stavi veliko N u stock
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 19:32:40 POSLE PODNE
dok stavim malo n izbaci mi 4 erora
Citatif(strcmp(Getname(playerid), "Dominik_Buljan",true) == 0)

CitatC:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(7) : warning 202: number of arguments does not match definition
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(17) : error 035: argument type mismatch (argument 1)
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(23) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(30) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(35) : error 001: expected token: ";", but found "("
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(35) : warning 215: expression has no effect
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(36) : error 017: undefined symbol "playerid"
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(36) : error 035: argument type mismatch (argument 2)
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(33) : warning 203: symbol is never used: "Playerid"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Crazyn3ss poslato April 22, 2012, 19:35:18 POSLE PODNE
#include <a_samp>

new privatecar;

public OnFilterScriptInit()
{
     privatecar = CreateVehicle(470,1766.0599,-1894.9680,13.5602,359.9476,0,0);
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
   
    if(newstate == PLAYER_STATE_DRIVER)
    {
         if(strcmp(GetName(playerid), "Dominik_Buljan",true) == 0)
         {
              if(vehicleid == privatecar)
           {
               return 1;
           }
           else
           {
          RemovePlayerFromVehicle(playerid);
           }
       }
     
   }
   return 1;
}

stock GetName(playerid)
{
    new name(MAX_PLAYER_NAME);
    GetPlayerName(playerid, name, sizeof name);
    return name;
}


aj probaj ovako
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 19:37:56 POSLE PODNE
CitatC:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(7) : warning 202: number of arguments does not match definition
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(8) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(17) : error 035: argument type mismatch (argument 1)
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(23) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(30) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(35) : error 001: expected token: ";", but found "("
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(35) : warning 215: expression has no effect
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(36) : error 035: argument type mismatch (argument 2)
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(36) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
opet :'(
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 20:15:27 POSLE PODNE
zna neko kak ovo rijesit ???
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Nedim_Gun poslato April 22, 2012, 20:17:33 POSLE PODNE
Daj citavu FS U codu
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 20:28:04 POSLE PODNE
Citat#include <a_samp>

new privatecar;

public OnFilterScriptInit()
{
     privatecar = CreateVehicle(470,1766.0599,-1894.9680,13.5602,359.9476,0,0);
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);

    if(newstate == PLAYER_STATE_DRIVER)
    {
         if(strcmp(GetName(playerid), "Dominik_Buljan",true) == 0)
         {
              if(vehicleid == privatecar)
           {
               return 1;
           }
           else
           {
          RemovePlayerFromVehicle(playerid);
           }
       }

   }
   return 1;
}

stock GetName(playerid)
{
    new name(MAX_PLAYER_NAME);
    GetPlayerName(playerid, name, sizeof name);
    return name;
}
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Crazyn3ss poslato April 22, 2012, 20:30:48 POSLE PODNE
daj tu liniju di ti baca erore..
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 20:36:08 POSLE PODNE
CitatC:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(7) : warning 202: number of arguments does not match definition
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(8) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(17) : error 035: argument type mismatch (argument 1)
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(23) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(30) : warning 217: loose indentation
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(35) : error 001: expected token: ";", but found "("
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(35) : warning 215: expression has no effect
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(36) : error 035: argument type mismatch (argument 2)
C:\Users\Buljan\Desktop\TechLand Xperia\filterscripts\Untitled.pwn(36) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Naslov: Odg: [pomoc]osobna vozila
Poruka od: Dodo_Shadow poslato April 22, 2012, 20:49:04 POSLE PODNE
treba jos sta
Naslov: Odg: [pomoc]osobna vozila
Poruka od: MasterGaming poslato April 22, 2012, 20:51:59 POSLE PODNE
OVO STAVI ISPOD
#define GetPlayerName
ispod
new privatecar;
Naslov: Odg: [pomoc]osobna vozila
Poruka od: MasterGaming poslato April 22, 2012, 21:02:06 POSLE PODNE
EVo 1 error sada

#include <a_samp>

new privatecar;
#define provatecar
#define GetPlayerName


public OnFilterScriptInit()
{
     privatecar = CreateVehicle(470,1766.0599,-1894.9680,13.5602,359.9476,0,0);
     return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);

    if(newstate == PLAYER_STATE_DRIVER)
    {
         if(strcmp(GetPlayerName(playerid),"Dominik_Buljan",true) == 0)
         {
              if(vehicleid == privatecar)
           {
               return 1;
           }
           else
           {
           RemovePlayerFromVehicle(playerid);
           }
       }

   }
   return 1;
   }
stock GetName(playerid)
{
    new name(MAX_PLAYER_NAME);
    GetPlayerName(playerid, name, sizeof name);
    return name;
}