Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Mugen Wizardry
User Banned
Posted: 7th Dec 2010 23:27
Hi all. Can someone please tell me how to make this call msgbox() only ONE time per each part of the function, such as when u cut it and there is no object selected, or when u cut it and there IS an object selected, and u selected yes to cut it.


if string2$="Cut"

if picked>0

msg=0

if msg=0

msg=msgbox("WARNING!","Are you sure you want to do this?",MBYESNO)

endif

if msg=6

if object exist(picked)

hide object picked

endif

endif

endif

else

if msg=0 and picked>0

msgbox("WARNING!","You MUST select an object before cutting it!",MBOK)

endif

msg = 1

endif

This is pretty much all I need. I simply need to know to call a msgbox() once per loop

Thanks!

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 8th Dec 2010 00:03
a)can you please indent your code
b)can you please use the code snippet option for code

based on the info you have provided I can only conclude this is what you are after - in which case I think its a sign that you are tired and need to give yourself a some rest before doing anymore. If not then we could do with more info. Is there some need to use a string variable for something that would be more efficent if a simple flag value was used instead? ie if cut=1..blah blah ...endif
C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 8th Dec 2010 00:05 Edited at: 8th Dec 2010 00:06
Eugh use a code snippet plox


Also, why do you have this in the code:

That means it'll always do what's inside that if statement...

I was also attempting to solve the problem but I can't see why this would display more than one msgbox each time its run. - Each call to a msgbox is separated by boolean opposite conditions (i.e. one is in the true part of an if statement and the other is in a false part). :S

We're gona need more code or a better explanation if you want this fixed.

Login to post a reply

Server time is: 2026-07-21 19:18:48
Your offset time is: 2026-07-21 19:18:48