Jump to content


Photo

Error: Assignment operator expected


  • Please log in to reply
8 replies to this topic

#1 Trenten

Trenten

    GMC Member

  • New Member
  • 68 posts

Posted 25 March 2012 - 05:20 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.
  • 0

#2 Ashley Phoenix

Ashley Phoenix

    GMC Member

  • GMC Member
  • 316 posts
  • Version:Unknown

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.

  • 0

#3 Trenten

Trenten

    GMC Member

  • New Member
  • 68 posts

Posted 25 March 2012 - 05:28 PM

thank you so much. It works perfectly. what should credit be given as?
  • 0

#4 Ashley Phoenix

Ashley Phoenix

    GMC Member

  • GMC Member
  • 316 posts
  • Version:Unknown

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"
  • 0

#5 Trenten

Trenten

    GMC Member

  • New Member
  • 68 posts

Posted 25 March 2012 - 05:38 PM

ok
  • 0

#6 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1596 posts
  • Version:GM8

Posted 25 March 2012 - 06:33 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.
  • 0

#7 Ashley Phoenix

Ashley Phoenix

    GMC Member

  • GMC Member
  • 316 posts
  • Version:Unknown

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. :)
  • 0

#8 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1596 posts
  • Version:GM8

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 :)
  • 0

#9 Ashley Phoenix

Ashley Phoenix

    GMC Member

  • GMC Member
  • 316 posts
  • Version:Unknown

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 :D
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users