abhi2011 Posted April 7, 2013 Share Posted April 7, 2013 That solves it. Check the code again. Type mismatch occurs when an invalid type is passed or tried to stored in a variable. Since the error occurs when your calling a sub, cross check ur parameters and the arguments of the sub. If they are the same type then I am not sure what the error can be. Otherwise it might fix your problem. Link to comment Share on other sites More sharing options...
Jumbofile Posted April 7, 2013 Author Share Posted April 7, 2013 where should i check Link to comment Share on other sites More sharing options...
abhi2011 Posted April 8, 2013 Share Posted April 8, 2013 Debug, hover over each variable, it might show Type Mismatch. On the basis of your findings correct the mistake. Or try giving me the entire sub.I'll check it out. Link to comment Share on other sites More sharing options...
Jumbofile Posted April 12, 2013 Author Share Posted April 12, 2013 which sub would that be? Link to comment Share on other sites More sharing options...
Jumbofile Posted April 12, 2013 Author Share Posted April 12, 2013 'Evilbunnie's DrawnChat systemPublic Sub DrawChat()Dim i As IntegerFor i = 1 To 6RenderText Font_Default, Chat(i).Text, Camera.Left + 10, (Camera.Bottom - 20) - (i * 20), Chat(i).Text, Chat(i).ColourNextEnd Sub'Evilbunnie's DrawChat systemPublic Sub ReOrderChat(ByVal nText As String, nColour As Long)Dim i As IntegerFor i = 19 To 1 Step -1Chat(i + 1).text = Chat(i).textChat(i + 1).Colour = Chat(i).ColourNextChat(1).text = nTextChat(1).Colour = nColourEnd SubPublic Sub AddText(ByVal Msg As String, ByVal color As Integer)Dim S As String' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerS = vbNewLine & MsgfrmMain.txtChat.SelStart = Len(frmMain.txtChat.Text)frmMain.txtChat.SelColor = QBColor(color)frmMain.txtChat.SelText = SfrmMain.txtChat.SelStart = Len(frmMain.txtChat.Text) - 1'Evilbunnie's DrawnChat SystemReOrderChat Msg, QBColor(color)' Error handlerExit Suberrorhandler:HandleError "AddText", "modText", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub Link to comment Share on other sites More sharing options...
abhi2011 Posted April 13, 2013 Share Posted April 13, 2013 Oh god. You still didn't understand did you? I'll check it and post the solution soon.Replace this (Your code)```RenderText Font_Default, Chat(i).Text, Camera.Left + 10, (Camera.Bottom - 20) - (i * 20), Chat(i).Text, Chat(i).Colour```With this (My code)```RenderText Font_Default, Chat(i).Text, Camera.Left + 10, (Camera.Bottom - 20) - (i * 20), Chat(i).Colour```Rather than passing the color code you were passing a string (The second last parameter should be a number you were passing a string) Link to comment Share on other sites More sharing options...
Jumbofile Posted April 13, 2013 Author Share Posted April 13, 2013 it dosnt show on the screen Link to comment Share on other sites More sharing options...
abhi2011 Posted April 13, 2013 Share Posted April 13, 2013 Thats a diffrent story. lol (send me the source. I'll try fixing it up.) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now