Skripta koju koristim:Vegina mojgm
Detaljan opis problema:Editam neka imena u skripti,i idem na compile/run i stvori mi se dole navedeno..
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno):
C:\DOCUME~1\xxx\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(6) : fatal error 100: cannot read from file: "a_npc"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Procitaj pravila,usput skini INC a_npc
Skripta koju koristim:
Detaljan opis problema:
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Eto,edito sam.. Sad cu probat to skinut..
EDIT: Skinuo sam,ali ponovo isto -.-
onda stavi // ispred a_npc //#include <a_npc>
To je rjeseno,sad su novi errori:
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(13825) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(14058) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(14305) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21038) : warning 219: local variable "mod" shadows a variable at a preceding level
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(40409) : error 021: symbol already defined: "strtok"
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(40424) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
daj linije u kodu
14058,14305,40424
14058 - x_nr = strtok(cmdtext, idx);
14305- x_nr = strtok(cmdtext, idx);
40424- return result;
REFRESH
Makni one // jer comentanje includova nece pomoci!!
skini novu verziju includa i stavi u pawno/includes
Citat: Cookie poslato Jul 13, 2011, 08:59:54 PRE PODNE
Makni one // jer comentanje includova nece pomoci!!
skini novu verziju includa i stavi u pawno/includes
Taj je problem rijesen,skinuo sam novi i to je to..Ali ovaj novi sto sam napisao?
Idi u folder de ti je gamemod>pawno>pawno i onda idi Load gamemod i onda compile.
Citat: Boki Pro poslato Jul 13, 2011, 09:53:03 PRE PODNE
Idi u folder de ti je gamemod>pawno>pawno i onda idi Load gamemod i onda compile.
Isto -.-'
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(40409) : error 021: symbol already defined: "strtok"
za ovaj error samo izbrisi tu liniju
Citat: Xmolâ,,¢ poslato Jul 13, 2011, 11:51:07 PRE PODNE
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(40409) : error 021: symbol already defined: "strtok"
za ovaj error samo izbrisi tu liniju
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(13826) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(14059) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(14306) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21039) : warning 219: local variable "mod" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Sad su 2 errora .?
Ajde daj malo vise od te linije (jedno 5,6 linija gore i 5,6 linija dole od te linije gde je error) i za prvi i za drugi error...
13826- if(strcmp(cmdtext, "/sprayer", true)==0)
{
if (Tag == 0) return SendClientMessage(playerid,RED,"Nema napisanih grafita okolo");
new string[28];
for(new stags = 0; stags < MAX_TAGS; stags++)
{
if (PlayerToPoint(playerid,2,TagInfo[stags][grafx],TagInfo[stags][grafy],TagInfo[stags][grafz]))
{
printf("%d - %d",Tag,stags);
format(string,sizeof(string),"Graffit sprayer: %s - Graffit ID #%d",TagInfo[stags][tgSprayer],stags);
SendClientMessage(playerid,GRAY,string);
}
}
}
14059- if(strcmp(cmd, "/load", true) == 0) // by LordMan
{
if(IsPlayerConnected(playerid))
{
new x_nr[128];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristi: /load [name] [ammount]");
SendClientMessage(playerid, COLOR_WHITE, "Dostupna imena: drugs, materials, weapon, weapon2, weapon3, weapon4");
return 1;
}
14306- if(strcmp(cmd, "/store", true) == 0) // by LordMan
{
if(IsPlayerConnected(playerid))
{
new x_nr[128];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristi: /store [name] [ammount]");
SendClientMessage(playerid, COLOR_WHITE, "Dostupna imena: drugs, materials, weapon, weapon2, weapon3, weapon4");
return 1;
}
21039- if(location == 99 || location == 100 || location == 102)
{
if(BizzInfo[location-99][bProducts] <= 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
new mod = 100;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "Koristi: /buygun [gunname] [ammoamount]");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
SendClientMessage(playerid, COLOR_GRAD2,string);
format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]);
SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
return 1;
}
new string[28];
new x_nr[128];
new x_nr[128];
Povecaj brojeve tu...
Citat: Xmolâ,,¢ poslato Jul 13, 2011, 12:53:01 POSLE PODNE
new string[28];
new x_nr[128];
new x_nr[128];
Povecaj brojeve tu...
Jel m0ze bilo koji broj ?
Ae stavi svuda 5000,i reci sta je bilo...
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(13826) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21039) : warning 219: local variable "mod" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 10948 bytes
Code size: 1693364 bytes
Data size: 5708064 bytes
Stack/heap size: 16384 bytes; estimated max. usage=9643 cells (38572 bytes)
Total requirements: 7428760 bytes
2 Warnings.
warning 219: local variable "mod" shadows a variable at a preceding level
za ovo izbrisi new mod = 100
a za prvi warn isto izbrisi new string[5000];
i javi sta je bilo
Citat: Xmolâ,,¢ poslato Jul 13, 2011, 13:21:34 POSLE PODNE
warning 219: local variable "mod" shadows a variable at a preceding level
za ovo izbrisi new mod = 100
a za prvi warn isto izbrisi new string[5000];
i javi sta je bilo
Jel da obisem samo to,ili jos nesto ispred,iza..?
Evo sta sam dobio kad sam izbrisao samo to sto si rekao:
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21045 -- 21046) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21048 -- 21049) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21051 -- 21052) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21054 -- 21055) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21075) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21080) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21085) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21090) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21095) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21100) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21105) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21110) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21115) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21120) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21125) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21130) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21135) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21140) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21145) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21150) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21155) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21160) : error 076: syntax error in the expression, or invalid function call
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(21165) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
23 Errors.
Cek,vrati to sto si izbrisao....i sad samo izbrisi new mod = 100; i reci sta je bilo....
Citat: Xmolâ,,¢ poslato Jul 13, 2011, 13:31:09 POSLE PODNE
Cek,vrati to sto si izbrisao....i sad samo izbrisi new mod = 100; i reci sta je bilo....
Ponovo isto -.-
vrati onda i new mod = 100; , a stavi new string[256]; za
C:\DOCUME~1\oler\Desktop\GAMEMO~1\GAMEMO~1.SAR\SAMPSE~1\GAMEMO~1\mojgm.pwn(13826) : warning 219: local variable "string" shadows a variable at a preceding level
i postaj linije od new mod = 100; pa dole....
new mod = 100;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "Koristi: /buygun [gunname] [ammoamount]");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
SendClientMessage(playerid, COLOR_GRAD2,string);
format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]);
SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
return 1;
}
Kada stavis new string[256]; za onaj prvi warn,jel ti se resi ili ostane??...a za ovo ne znam,trebalo mi da se obrise new mod = 100; ali posto nece ne znam.(posto je warn mozda ce da se skloni posle kada budes koristio tu komandu...:S)...
Citat: Xmolâ,,¢ poslato Jul 13, 2011, 15:24:09 POSLE PODNE
Kada stavis new string[256]; za onaj prvi warn,jel ti se resi ili ostane??...a za ovo ne znam,trebalo mi da se obrise new mod = 100; ali posto nece ne znam.(posto je warn mozda ce da se skloni posle kada budes koristio tu komandu...:S)...
ostane sve isto.ajd ad cu probat uci...