Arrays
#1

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
Reply
#2

Make the number after pName and pClan larger .

Happy scripting
~[HiC]TheKiller
Reply
#3

Since this topic is called "Arrays", how would you stream objects with "Incognitos Streamer Plugin", using an array?
Reply
#4

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.
Reply
#5

sorry i don`t know how?
Reply
#6

pawn Код:
format(PlayerInfo[playerid][pName],24,"%s",dini_Get(file, "name"));
format(PlayerInfo[playerid][pClan],24,"%s",dini_Get(file, "clan"));
Reply
#7

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..
Reply
#8

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.
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)