Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

[B809] Certain Lua script freezes Command

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [B809] Certain Lua script freezes Command Page: [1]
Login
Message << Older Topic   Newer Topic >>
[B809] Certain Lua script freezes Command - 4/2/2016 11:41:23 AM   
Gizzmoe


Posts: 155
Joined: 8/24/2005
From: Germany
Status: offline
This loop freezes and crashes Command (no error message) when I run it from the script console:

::loop::
print (string.sub(ScenEdit_CurrentTime(), 1, 10))
goto loop

Edit: It freezes Command after two seconds, after about 10-15 seconds it crashes.


< Message edited by Gizzmoe -- 4/2/2016 12:04:22 PM >
Post #: 1
RE: [B809] Certain Lua script freezes Command - 4/2/2016 11:51:52 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Doesn't ScenEdit_CurrentTime() return a number??
ScenEdit_CurrentTime ()
Gets the current time.
Returns:
number The UTC Unix timestamp of the current time in-game.




_____________________________

Michael

(in reply to Gizzmoe)
Post #: 2
RE: [B809] Certain Lua script freezes Command - 4/2/2016 11:53:50 AM   
Gizzmoe


Posts: 155
Joined: 8/24/2005
From: Germany
Status: offline
Yes, it returns a number.

(in reply to michaelm75au)
Post #: 3
RE: [B809] Certain Lua script freezes Command - 4/2/2016 11:58:09 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
I just tried it and it works. You have given it an infinite loop so it just keeps running. It probably exhausts resoruces

_____________________________

Michael

(in reply to michaelm75au)
Post #: 4
RE: [B809] Certain Lua script freezes Command - 4/2/2016 12:01:31 PM   
Gizzmoe


Posts: 155
Joined: 8/24/2005
From: Germany
Status: offline
quote:

ORIGINAL: michaelm
It probably exhausts resoruces


Yes, probably. It freezes Command after two seconds, after about 10-15 seconds it crashes. I guess it shouldn't be that way ;)


< Message edited by Gizzmoe -- 4/2/2016 12:02:50 PM >

(in reply to michaelm75au)
Post #: 5
RE: [B809] Certain Lua script freezes Command - 4/2/2016 12:05:22 PM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
I can't see what use you would have for the code snippet in an action/event in the game. It would basically stop the game.

_____________________________

Michael

(in reply to Gizzmoe)
Post #: 6
RE: [B809] Certain Lua script freezes Command - 4/2/2016 12:12:40 PM   
Gizzmoe


Posts: 155
Joined: 8/24/2005
From: Germany
Status: offline
That script is just part of my Lua learning-process and as a Lua/Script-noob I need to experiment a lot. Sure that script isn't useful as-is, but that is not the point of this thread.

(in reply to michaelm75au)
Post #: 7
RE: [B809] Certain Lua script freezes Command - 4/2/2016 12:58:12 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline
quote:

ORIGINAL: Gizzmoe

That script is just part of my Lua learning-process and as a Lua/Script-noob I need to experiment a lot. Sure that script isn't useful as-is, but that is not the point of this thread.


So what did you learn about running an infinite loop and then reporting it as a bug?

Mike




< Message edited by mikmyk -- 4/2/2016 1:01:56 PM >


_____________________________


(in reply to Gizzmoe)
Post #: 8
RE: [B809] Certain Lua script freezes Command - 4/2/2016 1:03:51 PM   
Gizzmoe


Posts: 155
Joined: 8/24/2005
From: Germany
Status: offline
quote:

ORIGINAL: mikmyk
So what did you learn about running infinite loops and then reporting it as a bug?


I just wanted to report it in case you devs consider it a bug. As you know an infinite loop doesn't automatically crash every piece of software per se, it all depends on how the software was designed.

(in reply to mikmykWS)
Post #: 9
RE: [B809] Certain Lua script freezes Command - 4/2/2016 1:09:00 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline
Uh huh.

Can you stop trying to annoy people. We have lives to live and these antics are not really moving the game ahead.

Thanks

Mike

_____________________________


(in reply to Gizzmoe)
Post #: 10
RE: [B809] Certain Lua script freezes Command - 4/2/2016 1:20:38 PM   
thewood1

 

Posts: 6529
Joined: 11/27/2005
Status: offline
Several of us thank you for finally saying that.

(in reply to mikmykWS)
Post #: 11
RE: [B809] Certain Lua script freezes Command - 4/2/2016 1:26:44 PM   
Gizzmoe


Posts: 155
Joined: 8/24/2005
From: Germany
Status: offline
It is not my plan to annoy people. I just found it weird that it makes Command actually crash and wanted to report it. In that case it apparently wasn't a valid bug report for you and I have no problems with your decision.

(in reply to mikmykWS)
Post #: 12
RE: [B809] Certain Lua script freezes Command - 4/2/2016 1:35:19 PM   
mikmykWS

 

Posts: 11524
Joined: 3/22/2005
Status: offline
Ok.

Mike

_____________________________


(in reply to Gizzmoe)
Post #: 13
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [B809] Certain Lua script freezes Command Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.078