Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: LOOP Operators?  (Read 3715 times)

0 Members and 1 Guest are viewing this topic.

revvin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
LOOP Operators?
« on: February 09, 2005, 11:33:41 AM »

I noticed in a script mnemonic supplied me he used "||" as an operator. I am guessing this is an "OR" equivalent?
Does anybody have any links to information on the types of Operators used in this script?  I am used to the old AND OR NOTs... but cant seem to get them to work?

I am trying to achieve:

    WHILE (Actor.X > StartX) AND (Actor.X < EndX) DO
        {
            code to execute
        }

Thanks again,
Kev
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: LOOP Operators?
« Reply #1 on: February 09, 2005, 11:53:29 AM »

Only the C-style operators are allowed:

|| ... or
&& ... and
== ... equal
!= ... non equal

And of course the obvious ones, <, >, <=, >=.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re: LOOP Operators?
« Reply #2 on: February 09, 2005, 10:30:01 PM »

That "DO" in your scrpit will most probably cause an error.
Logged

MMR

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 349
  • http://mmrdeveloper.wordpress.com/
    • View Profile
    • TinyWME
Re: LOOP Operators?
« Reply #3 on: February 09, 2005, 11:50:42 PM »

In WME Scripting should be...

Code: [Select]
while (actor.X > startX && actor.X < endX)
{
            code to execute
}

 ;D
Logged

revvin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
Re: LOOP Operators?
« Reply #4 on: February 10, 2005, 07:56:32 AM »

Cool. thanks guys. Just needed to know the C operators (I never learned any variation of C)

The "DO" would definitely cause an error yes - because its just there to explain the logic of what I was trying to accomplish (I am still learning the language - most of what I know comes from Turbo Pascal)

Thanks everybody
Kev

Logged
 

Page created in 0.051 seconds with 24 queries.