Yoko

All sides of Injection
It is currently 2026-01-17 17:32:36

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2004-12-05 01:46:02 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
Вот пример, цикла... почему не выполняется это условие - or (x==50)
Code:
sub test()
var x=0
REPEAT
UO.DeleteJournal()
UO.Print("1")
while NOT UO.InJournal("go") or (x==50)
wait(200)
x=x+1
wend
x=0
UO.Print("2")
wait(200)
Until UO.InJournal("off")
end sub


Top
   
 Post subject:
PostPosted: 2004-12-05 02:20:55 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
А вот так работает :)
Code:
sub test()
var x=0
REPEAT
UO.DeleteJournal()
UO.Print("1")
REPEAT
x=x+1
wait(200)
Until UO.InJournal("go") or (x==100)
x=0
UO.Print("2")
wait(200)
Until UO.InJournal("off")
end sub


Top
   
PostPosted: 2004-12-05 04:08:38 
Offline
User avatar

Joined: 2004-11-02 23:52:47
Posts: 86
Code:
sub test()
var x=0
REPEAT
UO.DeleteJournal()
UO.Print("1")
while NOT UO.InJournal("go") AND NOT x==50
wait(200)
x=x+1
wend
x=0
UO.Print("2")
wait(200)
Until UO.InJournal("off")
end sub

Попробуй так =)


Top
   
 Post subject:
PostPosted: 2004-12-05 05:41:50 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
ааааа точно :)
во блин... я протупил

а кстати, без разницы же ведь While() или Repeat() использовать.... суть то одна


Top
   
 Post subject:
PostPosted: 2004-12-05 10:29:06 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
666Man666 wrote:
а кстати, без разницы же ведь While() или Repeat() использовать.... суть то одна

Ну не совсем. Один с предусловием, другой с постусловием. Тобишь repeat хоть раз но выполнит тело цикла.


Top
   
 Post subject:
PostPosted: 2004-12-05 12:07:49 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
Понятно... будем знать :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited