It's easier to see bracket mismatches if you put each bracket on a line by itself and indent your code.
code:
function OnEvent_ChatWndReceiveMessage(Wnd,Sender,Msg,MsgKind)
{
if(Msg == rndnumber)
{
return rndnumber + "was the correct number.";
}
as you can see there's a missing bracket for the function header.
so it should be like this:
code:
function OnEvent_ChatWndReceiveMessage(Wnd,Sender,Msg,MsgKind)
{
if(Msg == rndnumber)
{
return rndnumber + "was the correct number.";
}
}
Edit: actually it's the exact same thing with the first section of your code too:
code:
function OnEvent_ChatWndSendMessage(Wnd,Msg) {
if(Msg == "!picknum") {
return Begin();
}
there should be one more bracket in the end again.