Problema Radar
#1

Am copiat dintr-un gm sistemul radar si cand dau compile imi da

D:\bottles\GM\gamemodes\GM.pwn(5527) : error 017: undefined symbol "Radaron"
D:\bottles\GM\gamemodes\GM.pwn(5531) : warning 213: tag mismatch
D:\bottles\GM\gamemodes\GM.pwn(5533) : error 017: undefined symbol "Carspeed"
D:\bottles\GM\gamemodes\GM.pwn(5534) : error 017: undefined symbol "Radarlimit"
D:\bottles\GM\gamemodes\GM.pwn(5539) : error 017: undefined symbol "Radarlimit"
D:\bottles\GM\gamemodes\GM.pwn(5541) : error 017: undefined symbol "Radarlimit"
D:\bottles\GM\gamemodes\GM.pwn(8826) : error 017: undefined symbol "Radaron"
D:\bottles\GM\gamemodes\GM.pwn(11338 -- 11339) : warning 202: number of arguments does not match definition
D:\bottles\GM\gamemodes\GM.pwn(21630) : error 012: invalid function call, not a valid address
D:\bottles\GM\gamemodes\GM.pwn(21630) : warning 215: expression has no effect
D:\bottles\GM\gamemodes\GM.pwn(21630) : error 001: expected token: ";", but found ")"
D:\bottles\GM\gamemodes\GM.pwn(21630) : error 029: invalid expression, assumed zero
D:\bottles\GM\gamemodes\GM.pwn(21630) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


10 Errors.

erorile sunt de la :

public CustomPickups()
{
new Floatldposx, Floatldposy, Floatldposz;
new string[564];
foreach(Player,i)
{
GetPlayerPos(i, oldposx, oldposy, oldposz);
if(Radaron[i] == 1)
{
foreach(Player, o)
{
if(IsPlayerInRangeOfPoint(o, 30.0, oldposx, oldposy, oldposz) && GetPlayerState(o) == PLAYER_STATE_DRIVER == 0)
{
new speed = Carspeed(i);
if(speed > Radarlimit[i])
{
new nameradar[25],nameradar1[25];
GetPlayerName(o,nameradar,sizeof(nameradar));
GetPlayerName(i,nameradar1,sizeof(nameradar1));
format(string, sizeof(string), "{f03337}%s[ID:%d] conduce cu %d km/h, locatia: %s, limita radarului: %d km/h!", nameradar,o,speed,GetPlayerZone(o),Radarlimit[i]);
SendClientMessage(i,COLOR_WHITE,string);
format(string, sizeof(string), "{f03337}Ai fost surpris de catre %s radar cu %d km/h, limita radarului este de: %d km/h.",nameradar1,speed,Radarlimit[i]);
SendClientMessage(o,COLOR_WHITE,string);
return 1;
}
}
}
}
}
return 1;
}
Reply
#2

am rezolvat acum imi da eroare la asta :
D:\bottles\GM\gamemodes\GM.pwn(21630) : error 012: invalid function call, not a valid address
D:\bottles\GM\gamemodes\GM.pwn(21630) : warning 215: expression has no effect
D:\bottles\GM\gamemodes\GM.pwn(21630) : error 001: expected token: ";", but found ")"
D:\bottles\GM\gamemodes\GM.pwn(21630) : error 029: invalid expression, assumed zero
D:\bottles\GM\gamemodes\GM.pwn(21630) : fatal error 107: too many error messages on one line


linia :
if(ccar && LSPDCar(tmpcar) || ccar && NgCar(tmpcar) || ccar && FbiCar(tmpcar));
Reply
#3

cel mai probabil este de la linia "if", avand in vedere ca el nu se termina niciodata in ";" ci intr-un block care la randul lui contine un set de comenzi de genul "{ printf("Learn more about pawn"); }
Reply
#4

undeva ai uitat sa pui ";"
Reply
#5

Am rezolvat . Doar ca nu functioneaza cum trebuie . Cand trece un player peste 100 km nu apare nimic nici lui nici mir
Reply
#6

ai uitat sa faci define (new, static sau #define) la:
Carspeed
Radarlimit
Radaron


Код:
new string[564];
format(string, sizeof(string), "{f03337}%s[ID:%d] conduce cu %d km/h, locatia: %s, limita radarului: %d km/h!", nameradar,o,speed,GetPlayerZone(o),Radarlimit[i]);
SendClientMessage(i,COLOR_WHITE,string);

ma uit la acesta functie, si vad numai cod scris in zadar! ar trebui sa faci niste lectii de pawno


new string[144];
format(string, sizeof(string), "{f03337}%s[ID:%d] conduce cu %d km/h, locatia: %s, limita radarului: %d km/h!", nameradar,o,speed,GetPlayerZone(o),Radarlimit[i]);
SendClientMessage(i,-1,string);
string[0] = EOS;
Reply
#7

Eu am luat acest script dintr.un gm.
Sunt incepator
Si am facut new radaron[MAX_PLAYERS]
NEW radarlimit[MAX_PLAYERS]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)