Error: Assignment operator expected
#1
Posted 25 March 2012 - 05:20 PM
I have read other topics on this subject but none match my problem. Could someone help plz.
CODE:
if hspeed>0 and sprite_index for (obj_Blob)=spr_Blob_left
instance_destroy(self)
ERROR MESSAGE:
FATAL ERROR in
action number 2
of Create Event
for object obj_slimeball:
COMPILATION ERROR in code action
Error in code at line 1:
if hspeed>0 and sprite_index for (obj_Blob)=spr_Blob_left
^
at position 43: Variable name expected.
Plz help will give credit.
#2
Posted 25 March 2012 - 05:25 PM
Hi,
I have read other topics on this subject but none match my problem. Could someone help plz.
CODE:
if hspeed>0 and sprite_index for (obj_Blob)=spr_Blob_left
instance_destroy(self)
ERROR MESSAGE:
FATAL ERROR in
action number 2
of Create Event
for object obj_slimeball:
COMPILATION ERROR in code action
Error in code at line 1:
if hspeed>0 and sprite_index for (obj_Blob)=spr_Blob_left
^
at position 43: Variable name expected.
Plz help will give credit.
Try this: if hspeed>0 && obj_Blob.sprite_index=spr_Blob_left
{
instance_destroy()
}
Edited by Ashley Phoenix, 25 March 2012 - 05:26 PM.
#3
Posted 25 March 2012 - 05:28 PM
#4
Posted 25 March 2012 - 05:36 PM
thank you so much. It works perfectly. what should credit be given as?
Name in the credits maybe?
"Ashley Phoenix"
#5
Posted 25 March 2012 - 05:38 PM
#6
Posted 25 March 2012 - 06:33 PM
#7
Posted 25 March 2012 - 06:42 PM
You don't have to give credit for something so simple and basic. Otherwise you might as well credit this forum, Google for getting you here, your web browser, your internet providers, the guy who invented the internet, the guy who invented the computer and so on.
Nothing wrong with giving credit for contribution.
#8
Posted 25 March 2012 - 06:55 PM
You don't have to give credit for something so simple and basic. Otherwise you might as well credit this forum, Google for getting you here, your web browser, your internet providers, the guy who invented the internet, the guy who invented the computer and so on.
Nothing wrong with giving credit for contribution.
I know, I meant no offense, I'm just saying
#9
Posted 25 March 2012 - 08:01 PM
You don't have to give credit for something so simple and basic. Otherwise you might as well credit this forum, Google for getting you here, your web browser, your internet providers, the guy who invented the internet, the guy who invented the computer and so on.
Nothing wrong with giving credit for contribution.
I know, I meant no offense, I'm just saying
No problem buddy
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











