Author Topic: getting an are your sure  (Read 4728 times)

sparkythex

  • Newbie
  • *
  • Posts: 43
getting an are your sure
« on: December 18, 2010, 08:58:47 AM »
I wanted to have an, "are you sure?" message.
I found in guide the following 2 examples.
 however neither seem to work or I am misunderstanding.
Code: [Select]
local ans
@example from guide:
Dialog mess,button1,button2
   Put AnswerFN into ans
   If ans=1 Then
     ...
   Else
     ...
   EndIf

I have tried it this way:
   
Code: [Select]
Dialog mess 'Are you sure?',button 1,button 2error is "message not found"

I have tried it this way:
   
Code: [Select]
Dialog 'Are you sure?',button 1,button 2error is "OK message not found"
same error is when trying with some spaces.
 ~  ~~    Dialog 'Are you sure?', button 1, button 2
also tried to use
 ~  ~    Dialog 'Are you sure?',OK,cancel
&
 ~   ~   Dialog 'Are you sure?',yes,no
========
so then i found this other way.
Code: [Select]
local ans,choice
Put ChoiceFN(question,option1,option2) into choice
   If choice=option1 Then
     Dosomething1
   Else
     Dosomething2
   EndIf
error is " ^ parameter error!"
same error with:
 ~  ~ Put ChoiceFN('are you sure',yes,no)
and with
  ~  ~ Put  ChoiceFN('are you sure',Ok,Cancel)
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »

sparkythex

  • Newbie
  • *
  • Posts: 43
Re: getting an are your sure
« Reply #1 on: December 19, 2010, 02:52:40 AM »
woot, woot.
this problem is self healing!

or rather i found an example of it
-- i was missing the quote marks
here is code for next person needing it!

Code: [Select]
Local ans

Dialog 'Restart?','Yes','No'
Put AnswerFN into ans

If ans=1 Then
    Call DoRestart
    GotoCard 1
EndIf
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »

 

anything