enum & string
#1

How do I get a string from file to enum info?

I've got;


pawn Код:
enum GroupData
{
    gExample[16],
}
new gData[PLAYERS][GroupData];
and using MXIni to get a string is; (ofcourse opening the file first,
as all the integers are taken correctly)
(This is done in a loop, yes)

pawn Код:
ini_getString(file,"Example",gData[i][gExample]);
But the string isn't stored, what is wrong?
Note that this works with normal strings, but not in enum data...
Also note that all other data is stored, but not strings.
Reply
#2

Hm, maybe its size isnt read correctly, try giving it to the function (dont know if it is possible with MXIni)

ini_getString(file,"Example",gData[i][gExample], 16);
Reply
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Hm, maybe its size isnt read correctly, try giving it to the function (dont know if it is possible with MXIni)

ini_getString(file,"Example",gData[i][gExample], 16);
Thank you very, very much. This is the kind of help that makes this section awesome
Reply
#4

No problem, I like helping more experienced people with more advanced questions. Helping you also helped me, as I now know that you cant get the length from enums, wasnt sure
Those 'How do I set a players position?' questions are lame
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)