Strlen undefined
#1

Hey everyone, for some unknown reason Im getting and error code saying that strlen is undefined when I compile. It is giving me line number 163 which I have included below

pawn Код:
{122},
This belongs to this block of code:

pawn Код:
new CivPedsMale[54][1] = {
{2},
{47},
{48},
{50},
{58},
{60},
{68},
{72},
{73},
{80},
{81},
{82},
{83},
{95},
{100},
{101},
{102},
{103},
{104},
{108},
{109},
{110},
{121},
{122},
{123},
{135},
{142},
{143},
{144},
{146},
{153},
{154},
{155},
{156},
{158},
{159},
{160},
{161},
{170},
{180},
{189},
{202},
{203},
{204},
{258},
{259},
{260},
{293},
{295},
{296},
{297},
{61},
{255},
{253}
};

I have went through every line and can't seem to discover the issue. Any help is appreciated. Thanks
Reply
#2

Change to
pawn Код:
new CivPedsMale[] = {
and remove all { and }

then you can use sizeof(CivPedsMale)
Reply
#3

Well seeing as how I wasn't paying attention, I discovered that it is referring to my YSI includes. Before help, I have already updated to the lastest versions. It keeps telling me there are things like strlen, strcmp, and printf undefined. Sorry for the delay in more information.
Reply
#4

Include a_samp first.
Reply
#5

Quote:
Originally Posted by Blade_Cervetti
Посмотреть сообщение
Hey everyone, for some unknown reason Im getting and error code saying that strlen is undefined when I compile. It is giving me line number 163 which I have included below

pawn Код:
{122},
This belongs to this block of code:

pawn Код:
new CivPedsMale[54][1] = {
{2},
{47},
{48},
{50},
{58},
{60},
{68},
{72},
{73},
{80},
{81},
{82},
{83},
{95},
{100},
{101},
{102},
{103},
{104},
{108},
{109},
{110},
{121},
{122},
{123},
{135},
{142},
{143},
{144},
{146},
{153},
{154},
{155},
{156},
{158},
{159},
{160},
{161},
{170},
{180},
{189},
{202},
{203},
{204},
{258},
{259},
{260},
{293},
{295},
{296},
{297},
{61},
{255},
{253}
};

I have went through every line and can't seem to discover the issue. Any help is appreciated. Thanks
Why would you use a 2-dimensional array for numbers?

This try:
PHP код:
new CivPedsMale[] = {
2,
47,
48,
50,
58,
60,
68,
72,
73,
80,
81,
82,
83,
95,
100,
101,
102,
103,
104,
108,
109,
110,
121,
122,
123,
135,
142,
143,
144,
146,
153,
154,
155,
156,
158,
159,
160,
161,
170,
180,
189,
202,
203,
204,
258,
259,
260,
293,
295,
296,
297,
61,
255
253
}; 
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
Include a_samp first.
It already is

Quote:
Originally Posted by Logofero
Посмотреть сообщение
Why would you use a 2-dimensional array for numbers?

This try:
PHP код:
new CivPedsMale[] = {
2,
47,
48,
50,
58,
60,
68,
72,
73,
80,
81,
82,
83,
95,
100,
101,
102,
103,
104,
108,
109,
110,
121,
122,
123,
135,
142,
143,
144,
146,
153,
154,
155,
156,
158,
159,
160,
161,
170,
180,
189,
202,
203,
204,
258,
259,
260,
293,
295,
296,
297,
61,
255
253
}; 
Already changed that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)