Mistlight Posted July 1, 2012 Author Share Posted July 1, 2012 This is regarding the events system. I'm trying to make a custom code to get the event's name, how do i do that? Could anyone help me?I tried doing it myself but it highlighted "Public Sub CustomScript(index As Long, caseID As Long)" and said "Compile error: ByRef argument type mismatch. What does that mean?This is how my CustomScript looks like.```Public Sub CustomScript(index As Long, caseID As Long) Select Case caseID Case 0 mapnum = GetPlayerMap(index) filename = App.Path & "\data\maps\map" & mapnum & "_eventdata.dat" GetVar filename, "Events", "EventCount", Val(Map(mapnum).EventCount) If Map(mapnum).EventCount > 0 Then For i = 1 To Map(mapnum).EventCount With Map(mapnum).Events(i) GetVar filename, "Event" & i, "Name", .Name Case Else PlayerMsg index, "You just activated custom script " & caseID & ". This script is not yet programmed.", BrightRed End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
jcsnider Posted July 1, 2012 Share Posted July 1, 2012 Why are you getting the information for the ini? It is already loaded into the memory…. I have no idea what you are trying to do but you can get the name of an event like this...```name = Map(GetPlayerMap(index)).Events(1).Name```That, for example would return the name of event 1 on the map the player is on. Link to comment Share on other sites More sharing options...
Mistlight Posted July 2, 2012 Author Share Posted July 2, 2012 oh ok. I didnt really know what I was trying to do too :x Thanks for the help! 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