Author Topic: Help with while loop  (Read 1862 times)

0 Members and 1 Guest are viewing this topic.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Help with while loop
« on: February 01, 2011, 06:19:02 PM »
I started making maps in Eufloria some days ago, but can't make more because of this simple error: My while loop won't start, but all the other stuff works fine, help???

FIXED!
« Last Edit: February 01, 2011, 07:02:31 PM by Aino »

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Help with while loop
« Reply #1 on: February 01, 2011, 06:25:06 PM »
I don't think that there is any problem with the while loop. Can you post your whole level? It might be something in the rest of it causing a problem.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #2 on: February 01, 2011, 06:29:50 PM »
Yep, your code looks fine to me.  :>  It should work.


As Pilchard says, if you can post the rest of the code that would be great.  If you don't want to make it public, just PM it to one of us.  :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Help with while loop
« Reply #3 on: February 01, 2011, 06:31:57 PM »
Just posted it... Hope you can help, else this will ruin my day xD

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Help with while loop
« Reply #4 on: February 01, 2011, 06:37:15 PM »
Forgot something on the top og the LevelLogic function, hope it isn't the fault ...

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #5 on: February 01, 2011, 06:37:35 PM »
Ok check back in 5 mins :>

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #6 on: February 01, 2011, 06:38:28 PM »
Bloddy hell, this is advanced for a first map!

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Help with while loop
« Reply #7 on: February 01, 2011, 06:41:15 PM »
Bloddy hell, this is advanced for a first map!
Thanks? Better thanks Alex and you for that... taking some examples :)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #8 on: February 01, 2011, 06:41:41 PM »
Found the problem in the console.  (press tilde ingame)  It relates to the way you're declaring the AI stuff.

Just uploading screenshot..





Will play around with it now and see if I can get it working.  :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Help with while loop
« Reply #9 on: February 01, 2011, 06:47:19 PM »
Found the problem in the console.  (press tilde ingame)  It relates to the way you're declaring the AI stuff.

Just uploading screenshot..

image*

Will play around with it now and see if I can get it working.  :>
Ohh, did never check the console... I am used to get error before starting the map... Thanks for the help there though :)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #10 on: February 01, 2011, 06:47:56 PM »
Aha!!

Think I got it.

Ok, currently you've formatted your AI commands like this:


Code: [Select]
GetEmpire(2):ExpandBlind(0)
Like it was a function.  But, the AI's attributes are actually a property of the AI.  So it should be formatted like this:


Code: [Select]
GetEmpire(2).ExpandBlind = 0edit - corrected typo in code above

Haven't tested i with all of them, but that is definitely what is going on, I think.
« Last Edit: February 01, 2011, 06:52:40 PM by annikk.exe »

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #11 on: February 01, 2011, 06:49:46 PM »
Ohh, did never check the console... I am used to get error before starting the map... Thanks for the help there though :)


Man, I should really make a "troubleshooting your maps" guide, outlining basic stuff like that.  Or mention it in the beginner's guide or something.  It's these small things we take for granted and forget to tell the new people about!

Hope you get this working now dude.  Let us know how you get on.  :>  Feel free to edit your initial post to remove the code if you don't want others to see the level before it's done.  :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Help with while loop
« Reply #12 on: February 01, 2011, 07:03:15 PM »
Thanks annikk, but one thing... isn't the while supposed to loop forever?

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Help with while loop
« Reply #13 on: February 01, 2011, 07:06:13 PM »
Code: [Select]
AI function/attribute stuff



Why didn't I see that?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Help with while loop
« Reply #14 on: February 01, 2011, 07:30:56 PM »
Thanks annikk, but one thing... isn't the while supposed to loop forever?

Yep, it should do.  Why, what behaviour are you seeing?