Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorry i put in the wrong code ! I meant this one

Status
Not open for further replies.

ebony4

Technical User
Apr 23, 2004
10
GB
I am trying to create a series of messages for one cast member . When the user clicks on the member it produces instructions , i am trying to create 3 messages so that its not the same message that appears all the time .
When i use this script a message comes up "script error: Expected end of statement"
---------------------------------------------------------------
on keyUp
lv_random = random(3)

if lv_random = 1 then alert("You have lost 23 the dice again"
&& gv_name && "message 1")

end if
if lv_random = 2 then alert("You have lost 23 points take too steps back "
&& gv_name && "message 2")

end if
if lv_random = 3 then alert("Go to start again" && gv_name && "message 3")

end if
 
Your code is missing "end", and that's why you're getting "Expected end of statement" error.

You said "When the user clicks on the member...". If so then the handler should be "on mouseUp" rather than "on keyUp".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top