Arrays - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Arrays (
/showthread.php?tid=161467)
Arrays -
Dudits - 20.07.2010
pawn Код:
enum pInfo
{
pName[24],
pClan[24],
}
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
Line 125: PlayerInfo[playerid][pName] = dini_Get(file, "name");
Line 125: PlayerInfo[playerid][pClan] = dini_Get(file, "clan");
Код:
(125) : error 047: array sizes do not match, or destination array is too small
(128) : error 047: array sizes do not match, or destination array is too small
Re: Arrays -
[HiC]TheKiller - 20.07.2010
Make the number after pName and pClan larger

.
Happy scripting
~[HiC]TheKiller
Re: Arrays -
Scenario - 20.07.2010
Since this topic is called "Arrays", how would you stream objects with "Incognitos Streamer Plugin", using an array?
Re: Arrays -
Dudits - 20.07.2010
Quote:
Originally Posted by [HiC]TheKiller
Make the number after pName and pClan larger  .
Happy scripting
~[HiC]TheKiller
|
I tried lots of big numbers and nothing worked.
Quote:
Originally Posted by [HiC]TheKiller
Make the number after pName and pClan larger  .
Happy scripting
~[HiC]TheKiller
|
Quote:
Originally Posted by RealCop228
Since this topic is called "Arrays", how would you stream objects with "Incognitos Streamer Plugin", using an array?
|
It's called arrays because that's what I need help with, you can create a new thread with your problem.
Re: Arrays -
aco_SRBIJA - 20.07.2010
sorry i don`t know how

?
Re: Arrays -
Jefff - 20.07.2010
pawn Код:
format(PlayerInfo[playerid][pName],24,"%s",dini_Get(file, "name"));
format(PlayerInfo[playerid][pClan],24,"%s",dini_Get(file, "clan"));
Re: Arrays -
s0nic - 20.07.2010
Is that all thats in the enum?
if so then delete the comma at the end of pClan[24]..so it would look like this
pawn Код:
enum pInfo
{
pName[24],
pClan[24]
}
Not sure if that will fix your problem..
Re: Arrays -
Dudits - 21.07.2010
Quote:
Originally Posted by Jefff
pawn Код:
format(PlayerInfo[playerid][pName],24,"%s",dini_Get(file, "name")); format(PlayerInfo[playerid][pClan],24,"%s",dini_Get(file, "clan"));
|
Replaced it with my current ones and worked, thanks.
Re: Arrays -
(SF)Noobanatior - 21.07.2010
with all of dracoblue's file the arrays are defined as 256 so if you use a different size you will get this error
or
you can edit the .inc files to the MAX_STRING value is smaller