undefined symbol,expected token,invalid expression
#1

I get these errors when I compile my script,
Код:
(14755) : error 017: undefined symbol "StopSign"
(14755) : error 001: expected token: ";", but found "]"
(14755) : error 029: invalid expression, assumed zero
What is at the line:
Код:
	StopSign[1] = CreateDynamicObject(16023, 114.6947, 1191.3103, 17.6388   0.0000, 0.0000, -26.4600);
I really dont know what is wrong with it, Help please!!
Reply
#2

Do you have a "new StopSign[(Some number)];" anywhere?
Reply
#3

Код:
new StopSigns[1];
Yep.
Reply
#4

[1] = 1 item, the 1st item in an array is 0.

pawn Код:
StopSign[0] = CreateDynamicObject(16023, 114.6947, 1191.3103, 17.6388   0.0000, 0.0000, -26.4600);
Forgot to mention, if you already have StopSign[0], you can just increase new StopSign[1] to StopSign[2].

Allow me to explain a little more.

VariableName[] is the beginning of an array. This is allowed but really not recommended. You are allowing the array to be filled with thousands of values and not needed in your case.

VariableName[1] means there is 1 item in the array, VariableName[128] there is 128 items in the array.
Reply
#5

Quote:
Originally Posted by ShiffeyTheGamer
Посмотреть сообщение
I get these errors when I compile my script,
Код:
(14755) : error 017: undefined symbol "StopSign"
(14755) : error 001: expected token: ";", but found "]"
(14755) : error 029: invalid expression, assumed zero
What is at the line:
Код:
	StopSign[1] = CreateDynamicObject(16023, 114.6947, 1191.3103, 17.6388   0.0000, 0.0000, -26.4600);
I really dont know what is wrong with it, Help please!!
check show me the line where you have put " new StopSign; "
Reply
#6

Quote:
Originally Posted by Isolated
Посмотреть сообщение
[1] = 1 item, the 1st item in an array is 0.

pawn Код:
StopSign[0] = CreateDynamicObject(16023, 114.6947, 1191.3103, 17.6388   0.0000, 0.0000, -26.4600);
Isolated is right ..

EDIT: remove "[1]" from tht line
Reply
#7

Quote:
Originally Posted by NGEN123
Посмотреть сообщение
Isolated is right ..

EDIT: remove "[1]" from tht line
And replace with 0?
Reply
#8

no just remove [1] if again given error so place [0] there

if i help you so plz rep+ me
Reply
#9

What the hell are you talking about NGEN123...

Just do what Isolated said.

You used StopSign[1] = ...
Use StopSign[0] instead.
Reply
#10

Sorry .. i just give him suggestion. i have test it thts why i say him .. btw isolate is gooder then me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)