Need Help [ compilation 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: Need Help [ compilation error ] (
/showthread.php?tid=382420)
Need Help [ compilation error ] -
RicaNiel - 03.10.2012
Hey guys i got a problem in here
i get this error when i complile
Код:
C:\Users\Daniel.Daniel-PC\samp\server\gamemodes\ricaniel.pwn(103) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
By the way here is the code
pawn Код:
enum sfiles
{
botname[129]
}
new sdata[sfiles];
if(!fexist(SERVER_DATA))
{
file_Create(SERVER_DATA);
if(file_Open(SERVER_DATA))
{
file_SetStr("bot_name","RicaNiel");
file_Save(SERVER_DATA);
file_Close();
}
}
else
{
if(file_Open(SERVER_DATA))
{
sdata[botname] = file_GetStr("bot_name");
file_Save(SERVER_DATA);
file_Close();
}
}
AW: Need Help [ compilation error ] -
BiosMarcel - 03.10.2012
I think you can't use file_open with if()
Re: AW: Need Help [ compilation error ] -
RicaNiel - 03.10.2012
Quote:
Originally Posted by [Bios]Marcel
I think you can't use file_open with if()
|
I'd done it but it is still same error that i get when i compile
pawn Код:
else
{
file_Open(SERVER_DATA);
sdata[botname] = file_GetStr("bot_name");
file_Save(SERVER_DATA);
file_Close();
}
AW: Need Help [ compilation error ] -
BiosMarcel - 03.10.2012
file_Close(SERVER_DATA);
Re: AW: Need Help [ compilation error ] -
RicaNiel - 03.10.2012
Quote:
Originally Posted by [Bios]Marcel
file_Close(SERVER_DATA);
|
its unknown directive
i use
Southclaw's INI File Script
as my INI Writer
and i use Y_ini for the player data
AW: Need Help [ compilation error ] -
BiosMarcel - 03.10.2012
which line is it?
Re: AW: Need Help [ compilation error ] -
RicaNiel - 03.10.2012
Quote:
Originally Posted by [Bios]Marcel
which line is it?
|
The file_Close();
AW: Need Help [ compilation error ] -
BiosMarcel - 03.10.2012
Hm if i understand this right the line is unfixable їїї
Re: Need Help [ compilation error ] -
RicaNiel - 03.10.2012
Quote:
Originally Posted by ******
Given that you didn't bother to tell us which line the error is on, I'd guess this is the problem:
pawn Код:
sdata[botname] = file_GetStr("bot_name");
I don't know what size array that function returns so you'll have to check the include's documentation or source.
|
Oh thanks ****** i found it its 256
Thank you so much