02-01-2009, 06:01 AM
BTW, I ask these questions because you guys are credible, and the good ol' ED 3.3.2 isn't supported at OGC anymore. 
So I was bored, and figured it might be a bit fun to design. So far, I'm using GetVar and Putvar functions, to put it in their account file, and then when they want to check it, it grabs the var. However, I have a problem. The way I have the PutVar set up, it always sets it to Msg1. I want there to be ten mail slots, so how would I do this? What I'm asking, is how do I check to see if Msg1 is an open slot to put it, if it's full go to slot 2, and so on and so forth, until there are no slots open. Here's my code.
(Yeah, yeah, yeah, I know I ripped a lot of code :\, in fact pretty much all of it.)

So I was bored, and figured it might be a bit fun to design. So far, I'm using GetVar and Putvar functions, to put it in their account file, and then when they want to check it, it grabs the var. However, I have a problem. The way I have the PutVar set up, it always sets it to Msg1. I want there to be ten mail slots, so how would I do this? What I'm asking, is how do I check to see if Msg1 is an open slot to put it, if it's full go to slot 2, and so on and so forth, until there are no slots open. Here's my code.
Code:
Case MAILMSG_CHAR
MsgTo = FindPlayer(Parse$(1))
Msg = Parse$(2)
' Prevent hacking
For i = 1 To Len(Msg)
If Asc(Mid$(Msg, i, 1)) < 32 Or Asc(Mid$(Msg, i, 1)) > 126 Then
Call HackingAttempt(Index, "Player Msg Text Modification")
Exit Sub
End If
Next
'If frmServer.chkP.Value = Unchecked Then
' If GetPlayerAccess(Index) 0 Then
Call AddLog(GetPlayerName(Index) & " mailed " & GetPlayerName(MsgTo) & ", " & Msg & "'", PLAYER_LOG)
Call PutVar(App.Path & "/accounts/" & GetPlayerLogin(Index) & ".ini", "Mail", "msg1", Msg)
Call PlayerMsg(Index, "You sent " & GetPlayerName(MsgTo) & " a message", TellColor)
Else
Call PlayerMsg(Index, "Player is not online.", White)
End If
(Yeah, yeah, yeah, I know I ripped a lot of code :\, in fact pretty much all of it.)