Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: apocolcase poslato Jun 19, 2010, 17:14:32 POSLE PODNE

Naslov: Sta je sad ovo?
Poruka od: apocolcase poslato Jun 19, 2010, 17:14:32 POSLE PODNE
Sve sam lijepo uradio,preveo i op,pet errora:
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(958) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(969) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1061) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1702) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1838) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1875) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1919) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.


Mod lvdm2
Naslov: Odg: Sta je sad ovo?
Poruka od: [CH] ♫◄[Sam]►♫ poslato Jun 19, 2010, 20:09:33 POSLE PODNE
postaj te redove u kojima su errori...
Naslov: Odg: Sta je sad ovo?
Poruka od: LuKsA poslato Jun 19, 2010, 20:13:29 POSLE PODNE
ako imas npr. new string[32];

stavi na 64, na 128, nemoj na 256 jer to preopterecuje skriptu i nije nikakva optizacija
Naslov: Odg: Sta je sad ovo?
Poruka od: apocolcase poslato Jun 20, 2010, 13:21:00 POSLE PODNE
bilo je na 128 stavio sam na64 i opet isto...i gdje su ti errori ne kontam...prvi mi je  gamemod koji prevodim..
Naslov: Odg: Sta je sad ovo?
Poruka od: Tko je taj Pokémon? Dexter! poslato Jun 20, 2010, 13:24:28 POSLE PODNE
Ovo u zagradi poslije pwn, naprimjer ...vdm2.pwn(958) je error u redu 958, pa kopiraj te redove iz gamemoda (i par iznad i ispod) i stavi u code=c
Naslov: Odg: Sta je sad ovo?
Poruka od: apocolcase poslato Jun 20, 2010, 13:35:21 POSLE PODNE

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new playername[MAX_PLAYER_NAME];
    new string[128];
    new cmd[30];
    new idx;
    cmd = strtok(cmdtext, idx);// strok
    new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new giveplayerid, moneys;

    if (strcmp(cmd, "/name", true) ==0 )
{
if (IsPlayerAdmin(playerid))
{
new tmp[30];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[USAGE] /name off/on ");
}


    if(strcmp(cmd, "/getstats", true) == 0)
    {
    new tmp[30];
    tmp = strtok(cmdtext, idx);
    new otherplayer = strval(tmp);
    if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"USAGE: /getstats [playerid]");
return 1;
}


if(strcmp(cmd, "/catch", true) == 0)
{
new tmp[30];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
new car;
car = GetPlayerVehicleID(playerid);
if(!strlen(tmp))
if(GetPlayerRank(playerid) >= 20)
{

if(strcmp(cmd, "/letgo", true) == 0)
{
new tmp[30];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
new car;
car = GetPlayerVehicleID(playerid);
if(!strlen(tmp))
if(GetPlayerRank(playerid) >= 20)
{


SendClientMessage(playerid,COLOR_BRIGHTRED," Morate biti 20 nivo da budete policajac!");
}
else
{
SendClientMessage(playerid,COLOR_BRIGHTRED," Ovaj igrac je vec pusten");
}
return 1;
}

[/code=c]

nadam se da sam dobro uradio
Naslov: Odg: Sta je sad ovo?
Poruka od: Zero[S] poslato Jun 20, 2010, 22:36:05 POSLE PODNE
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1919) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange"
Ovaj erore ces ispraviti tako sto dodas pod forward

forward OnPlayerPrivmsg(playerid, recieverid, text[]);

Naslov: Odg: Sta je sad ovo?
Poruka od: apocolcase poslato Jun 21, 2010, 16:31:53 POSLE PODNE
Citat: ZeroS] link=topic=8187.msg70460#msg70460 date=1277066165]
Z:\miso\gta\Server\gamemodes\lvdm2.pwn(1919) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange"
Ovaj erore ces ispraviti tako sto dodas pod forward

forward OnPlayerPrivmsg(playerid, recieverid, text[]);


nema nigdje forward o.O
Naslov: Odg: Sta je sad ovo?
Poruka od: ΉΥPΣЯΛƬӨЯ poslato Jun 21, 2010, 16:37:47 POSLE PODNE
forward OnPlayerPrivmsg(playerid, recieverid, text[]);

to stavi negdje pri početku skripte
Naslov: Odg: Sta je sad ovo?
Poruka od: apocolcase poslato Jun 22, 2010, 15:05:26 POSLE PODNE
kad to uradim izbaci mi 7 errora
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(958) : error 001: expected token: "-identifier-", but found "forward"
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(960) : error 010: invalid function or declaration
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(969) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(1061) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(1702) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(1838) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(1875) : error 047: array sizes do not match, or destination array is too small
Z:\miso\gta\Server2\gamemodes\lvdm2.pwn(1919) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.