error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error (
/showthread.php?tid=614328)
error -
Dejan12345 - 07.08.2016
hey guys i makeadmin command but i cant fix error
Code:
CMD:postaviadmina(playerid,params[])
{
new id,lvl,str[80],str1[80];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"Samo Owner");
if(sscanf(params,"ud",id,lvl)) return SendClientMessage(playerid, -1,"/postaviadmina (id) (lvl)]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"Taj igrac nije online");
if(lvl == GetPVarInt(id,"Admin")) return SendClientMessage(playerid, -1,"Igrac je vec taj lvl");
SetPVarInt(id,"Admin", lvl);
format(str,80,"%s vam je dao admin nivo %d,Ime(playerid),lvl);
SendClientMessage(id,-1,str);
format(str1,80,"Dali ste %s-u admin nivo %d",Ime(id),lvl);
SendClientMessage(playerid,-1,str1);
return true;
Code:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(67) : error 021: symbol already defined: "PlayerInfo"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : error 037: invalid string (possibly non-terminated string)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : error 017: undefined symbol "vam"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : error 017: undefined symbol "je"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
help
}
Re: last today guys -
SyS - 07.08.2016
what is the error?
Re: error -
Dejan12345 - 07.08.2016
Code:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(67) : error 021: symbol already defined: "PlayerInfo"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : error 037: invalid string (possibly non-terminated string)
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : error 017: undefined symbol "vam"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : error 017: undefined symbol "je"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(682) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Re: error -
BR3TT - 07.08.2016
Line 680:
Code:
format(str,80,"%s vam je dao admin nivo %d",Ime(playerid),lvl);
You forgot a quotation mark at the end of your string.
And you haven't defined 'Ime' on line 680 and 682, it's trying to obtain I guess the admin level but it isn't a thing.
Re: error -
Dejan12345 - 07.08.2016
now only simbol already defined PlayerInfo
Re: error -
SyS - 07.08.2016
Quote:
Originally Posted by Dejan12345
now only simbol already defined PlayerInfo
|
show line 67 you may have declared it twice
Re: error -
Dejan12345 - 07.08.2016
yes bro i do it
Re: error -
Dejan12345 - 07.08.2016
guys i fix it thanks
Re: error -
SyS - 07.08.2016
Quote:
Originally Posted by Dejan12345
yes bro i do it
|
thats where the error comes from remove one of the declaration.(keep the global one)
Edit:Sorry i didnt see your post.
Re: error -
Dejan12345 - 07.08.2016
bro you see i dont in first time post errors