Jump to content


Photo

Day/night error


  • Please log in to reply
3 replies to this topic

#1 Blackknight37

Blackknight37

    GMC Member

  • GMC Member
  • 242 posts

Posted 10 August 2012 - 12:34 AM

I found a day/night example on the GMC, and tried to implement it into my game, did everything correctly,

___________________________________________
FATAL ERROR in
action number 1
of Create Event
for object time:

COMPILATION ERROR in code action
Error in code at line 6:
night=false
^
at position 7: Variable name expected.

The originally thing was written in GM6, so would this cause the error?
I a link tot he example used is needed please lemme know ^.^
  • 0

#2 Mercerenies

Mercerenies

    Koopa King

  • GMC Member
  • 646 posts
  • Version:GM:Studio

Posted 10 August 2012 - 12:43 AM

Do you have an object or other resource named "night" by chance? That might cause it. Go to Scripts->Check Resource Names to make sure.
  • 0

#3 atamasco

atamasco

    GMC Member

  • GMC Member
  • 85 posts
  • Version:GM8.1

Posted 10 August 2012 - 12:44 AM

well, after i figured out what you were saying,

checklist:

make variables global?
make object persistant?

is there a day variable that is functioning prperly?

varaible being accessed by other instances?
  • 0

#4 Mercerenies

Mercerenies

    Koopa King

  • GMC Member
  • 646 posts
  • Version:GM:Studio

Posted 10 August 2012 - 12:52 AM

make variables global?

Wouldn't change anything. He's setting the variable, not getting it. Wouldn't cause an error either way.

make object persistant?

...Why?

varaible being accessed by other instances?

How would that cause an error to show?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users