Joe888888 Posted February 16, 2010 Author Share Posted February 16, 2010 Hey everyone!I installed the action bar, and now I am getting this wierd variable not defined error, can somebody please quick debug my source, if you post here saying you are willing, then i will send you it, this sounds really stupid, get over it. Link to comment Share on other sites More sharing options...
Robin Posted February 16, 2010 Share Posted February 16, 2010 That's not how it works. You're not going to learn anything by giving someone else the work to do.Post all the information about your error and people will help you fix it.Also, isn't the Action Bar tutorial bugged to hell? Link to comment Share on other sites More sharing options...
Joe888888 Posted February 16, 2010 Author Share Posted February 16, 2010 The reason I wanted to send it to someone was because I don't think a lot of people will be familiar with the problem if they don't see the action bar code, but w/e.Umm, well anyway, I guess here is the problems:Trying to compile client:Compile Error, variable not defined, and it highlights the first image16 you see, nothing else, here is the first sub and startup for frmstable (i have ES, it is called frmirage i think in EE?) Remember, this is part of the action bar source edit.```Option ExplicitPrivate Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As IntegerPrivate Sub Image5_Click() Dim ssp As String Dim I Dim J ssp = Label14(10).Caption I = 0 J = 0 Dim p As String Dim R As String While I < lstSpells.ListCount p = lstSpells.List(I) R = Right(p, Len(p) - 3) If StrComp(R, ssp) = 0 Then J = I End If I = I + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image5.Picture = Image16.Picture Call SendData("setspell10" & SEP_CHAR & Null & END_CHAR) Else If Image5.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(J)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd Sub```And when I try compiling the server:Same error message, it highlights the first FileData =in ModHandleData, here is the first sub and startup:```Option ExplicitSub HandleData(ByVal Index As Long, ByVal Data As String) Dim Parse() As String On Error Resume Next Parse = Split(Data, SEP_CHAR) Select Case LCase$(Parse(0)) Case "setspell1" Call WriteINI("SK1", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell1" FileData = ReadINI("SK1", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell1" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell2" Call WriteINI("SK2", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell2" FileData = ReadINI("SK2", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell2" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell3" Call WriteINI("SK3", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell3" FileData = ReadINI("SK3", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell3" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell4" Call WriteINI("SK4", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell4" FileData = ReadINI("SK4", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell4" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell5" Call WriteINI("SK5", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell5" FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell5" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell6" Call WriteINI("SK6", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell6" FileData = ReadINI("SK6", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell6" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell7" Call WriteINI("SK7", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell7" FileData = ReadINI("SK7", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell7" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell8" Call WriteINI("SK8", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell8" FileData = ReadINI("SK8", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell8" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell9" Call WriteINI("SK9", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell5" FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell9" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell10" Call WriteINI("SK10", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell10" FileData = ReadINI("SK10", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell10" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "requesteditmain" Call Packet_RequestEditMain(Index, Parse(1)) Exit Sub Case "newmain" Call Packet_NewMain(Index, Parse(1), Parse(2)) Exit Sub Case "guildmsg" Call Packet_GuildMsg(Index, Parse(1)) Exit Sub Case "getclasses" Call Packet_GetClasses(Index) Exit Sub Case "newaccount" Call Packet_NewAccount(Index, Parse(1), Parse(2), Parse(3)) Exit Sub Case "delaccount" Call Packet_DeleteAccount(Index, Parse(1), Parse(2)) Exit Sub Case "acclogin" Call Packet_AccountLogin(Index, Parse(1), Parse(2), Val(Parse(3)), Val(Parse(4)), Val(Parse(5)), Parse(6)) Exit Sub Case "givemethemax" Call Packet_GiveMeTheMax(Index) Exit Sub Case "addchar" Call Packet_AddCharacter(Index, Parse(1), Val(Parse(2)), Val(Parse(3)), Val(Parse(4)), Val(Parse(5)), Val(Parse(6)), Val(Parse(7))) Exit Sub Case "delchar" Call Packet_DeleteCharacter(Index, Val(Parse(1))) Exit Sub Case "usechar" Call Packet_UseCharacter(Index, Val(Parse(1))) Exit Sub Case "guildchangeaccess" Call Packet_GuildChangeAccess(Index, Parse(1), Val(Parse(2))) Exit Sub Case "guilddisown" Call Packet_GuildDisown(Index, Parse(1)) Exit Sub Case "guildleave" Call Packet_GuildLeave(Index) Exit Sub Case "guildmake" Call Packet_GuildMake(Index, Parse(1), Parse(2)) Exit Sub Case "guildmember" Call Packet_GuildMember(Index, Parse(1)) Exit Sub Case "guildtrainee" Call Packet_GuildTrainee(Index, Parse(1)) Exit Sub Case "saymsg" Call Packet_SayMessage(Index, Parse(1)) Exit Sub Case "emotemsg" Call Packet_EmoteMessage(Index, Parse(1)) Exit Sub Case "broadcastmsg" Call Packet_BroadcastMessage(Index, Parse(1)) Exit Sub Case "globalmsg" Call Packet_GlobalMessage(Index, Parse(1)) Exit Sub Case "adminmsg" Call Packet_AdminMessage(Index, Parse(1)) Exit Sub Case "playermsg" Call Packet_PlayerMessage(Index, Parse(1), Parse(2)) Exit Sub Case "playermove" Call Packet_PlayerMove(Index, Val(Parse(1)), Val(Parse(2)), Val(Parse(3)), Val(Parse(4))) Exit Sub Case "playerdir" Call Packet_PlayerDirection(Index, Val(Parse(1))) Exit Sub Case "useitem" Call Packet_UseItem(Index, Val(Parse(1))) Exit Sub Case "playermovemouse" Call Packet_PlayerMoveMouse(Index, Val(Parse(1))) Exit Sub Case "warp" Call Packet_Warp(Index, Val(Parse(1))) Exit Sub Case "endshot" Call Packet_EndShot(Index, Val(Parse(1))) Exit Sub Case "attack" Call Packet_Attack(Index) Exit Sub Case "usestatpoint" Call Packet_UseStatPoint(Index, Val(Parse(1))) Exit Sub Case "setplayersprite" Call Packet_SetPlayerSprite(Index, Parse(1), Val(Parse(2))) Exit Sub Case "getstats" Call Packet_GetStats(Index, Parse(1)) Exit Sub Case "requestnewmap" Call Packet_RequestNewMap(Index, Val(Parse(1))) Exit Sub Case "warpmeto" Call Packet_WarpMeTo(Index, Parse(1)) Exit Sub Case "warptome" Call Packet_WarpToMe(Index, Parse(1)) Exit Sub Case "mapdata" Call Packet_MapData(Index, Parse) Exit Sub Case "needmap" Call Packet_NeedMap(Index, Parse(1)) Exit Sub Case "mapgetitem" Call Packet_MapGetItem(Index) Exit Sub Case "mapdropitem" Call Packet_MapDropItem(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "maprespawn" Call Packet_MapRespawn(Index) Exit Sub Case "kickplayer" Call Packet_KickPlayer(Index, Parse(1)) Exit Sub Case "banlist" Call Packet_BanList(Index) Exit Sub Case "bandestroy" Call Packet_BanListDestroy(Index) Exit Sub Case "banplayer" Call Packet_BanPlayer(Index, Parse(1)) Exit Sub Case "requesteditmap" Call Packet_RequestEditMap(Index) Exit Sub Case "requestedititem" Call Packet_RequestEditItem(Index) Exit Sub Case "edititem" Call Packet_EditItem(Index, Val(Parse(1))) Exit Sub Case "saveitem" Call Packet_SaveItem(Index, Parse) Exit Sub Case "enabledaynight" Call Packet_EnableDayNight(Index) Exit Sub Case "daynight" Call Packet_DayNight(Index) Exit Sub Case "requesteditnpc" Call Packet_RequestEditNPC(Index) Exit Sub Case "editnpc" Call Packet_EditNPC(Index, Val(Parse(1))) Exit Sub Case "savenpc" Call Packet_SaveNPC(Index, Parse) Exit Sub Case "requesteditshop" Call Packet_RequestEditShop(Index) Exit Sub Case "editshop" Call Packet_EditShop(Index, Val(Parse(1))) Exit Sub Case "saveshop" Call Packet_SaveShop(Index, Parse) Exit Sub Case "requesteditspell" Call Packet_RequestEditSpell(Index) Exit Sub Case "editspell" Call Packet_EditSpell(Index, Val(Parse(1))) Exit Sub Case "savespell" Call Packet_SaveSpell(Index, Parse) Exit Sub Case "forgetspell" Call Packet_ForgetSpell(Index, Val(Parse(1))) Exit Sub Case "setaccess" Call Packet_SetAccess(Index, Parse(1), Val(Parse(2))) Exit Sub Case "whosonline" Call Packet_WhoIsOnline(Index) Exit Sub Case "onlinelist" Call Packet_OnlineList(Index) Exit Sub Case "setmotd" Call Packet_SetMOTD(Index, Parse(1)) Exit Sub Case "buy" Call Packet_BuyItem(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "sellitem" Call Packet_SellItem(Index, Val(Parse(1)), Val(Parse(2)), Val(Parse(3)), Val(Parse(4))) Exit Sub Case "fixitem" Call Packet_FixItem(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "search" Call Packet_Search(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "search2" Call Packet_Search2(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "playerchat" Call Packet_PlayerChat(Index, Parse(1)) Exit Sub Case "achat" Call Packet_AcceptChat(Index) Exit Sub Case "dchat" Call Packet_DenyChat(Index) Exit Sub Case "qchat" Call Packet_QuitChat(Index) Exit Sub Case "sendchat" Call Packet_SendChat(Index, Parse(1)) Exit Sub Case "pptrade" Call Packet_PrepareTrade(Index, Parse(1)) Exit Sub Case "atrade" Call Packet_AcceptTrade(Index) Exit Sub Case "qtrade" Call Packet_QuitTrade(Index) Exit Sub Case "dtrade" Call Packet_DenyTrade(Index) Exit Sub Case "updatetradeinv" Call Packet_UpdateTradeInventory(Index, Val(Parse(1)), Val(Parse(2)), Parse(3), Val(Parse(4))) Exit Sub Case "swapitems" Call Packet_SwapItems(Index) Exit Sub Case "party" Call Packet_Party(Index, Parse(1)) Exit Sub Case "joinparty" Call Packet_JoinParty(Index) Exit Sub Case "leaveparty" Call Packet_LeaveParty(Index) Exit Sub Case "partychat" Call Packet_PartyChat(Index, Parse(1)) Exit Sub Case "spells" Call Packet_Spells(Index) Exit Sub Case "hotscript" Call Packet_HotScript(Index, Val(Parse(1))) Exit Sub Case "scripttile" Call Packet_ScriptTile(Index, Val(Parse(1))) Exit Sub Case "cast" Call Packet_Cast(Index, Val(Parse(1))) Exit Sub Case "refresh" Call Packet_Refresh(Index) Exit Sub Case "buysprite" Call Packet_BuySprite(Index) Exit Sub Case "clearowner" Call Packet_ClearOwner(Index) Exit Sub Case "requestedithouse" Call Packet_RequestEditHouse(Index) Exit Sub Case "buyhouse" Call Packet_BuyHouse(Index) Exit Sub Case "sellhouse" Call Packet_SellHouse(Index) Exit Sub Case "checkcommands" Call Packet_CheckCommands(Index, Parse(1)) Exit Sub Case "prompt" Call Packet_Prompt(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "querybox" Call Packet_QueryBox(Index, Parse(1), Val(Parse(2))) Exit Sub Case "requesteditarrow" Call Packet_RequestEditArrow(Index) Exit Sub Case "editarrow" Call Packet_EditArrow(Index, Val(Parse(1))) Exit Sub Case "savearrow" Call Packet_SaveArrow(Index, Val(Parse(1)), Parse(2), Val(Parse(3)), Val(Parse(4)), Val(Parse(5))) Exit Sub Case "checkarrows" Call Packet_CheckArrows(Index, Val(Parse(1))) Exit Sub Case "requesteditemoticon" Call Packet_RequestEditEmoticon(Index) Exit Sub Case "requesteditelement" Call Packet_RequestEditElement(Index) Exit Sub Case "requesteditquest" Call Packet_RequestEditQuest(Index) Exit Sub Case "editemoticon" Call Packet_EditEmoticon(Index, Val(Parse(1))) Exit Sub Case "editelement" Call Packet_EditElement(Index, Val(Parse(1))) Exit Sub Case "saveemoticon" Call Packet_SaveEmoticon(Index, Val(Parse(1)), Parse(2), Val(Parse(3))) Exit Sub Case "saveelement" Call Packet_SaveElement(Index, Val(Parse(1)), Parse(2), Val(Parse(3)), Val(Parse(4))) Exit Sub Case "checkemoticons" Call Packet_CheckEmoticon(Index, Val(Parse(1))) Exit Sub Case "mapreport" Call Packet_MapReport(Index) Exit Sub Case "gmtime" Call Packet_GMTime(Index, Val(Parse(1))) Exit Sub Case "weather" Call Packet_Weather(Index, Val(Parse(1))) Exit Sub Case "warpto" Call Packet_WarpTo(Index, Val(Parse(1)), Val(Parse(2)), Val(Parse(3))) Exit Sub Case "localwarp" Call Packet_LocalWarp(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "arrowhit" Call Packet_ArrowHit(Index, Val(Parse(1)), Val(Parse(2)), Val(Parse(3)), Val(Parse(4))) Exit Sub Case "bankdeposit" Call Packet_BankDeposit(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "bankwithdraw" Call Packet_BankWithdraw(Index, Val(Parse(1)), Val(Parse(2))) Exit Sub Case "reloadscripts" Call Packet_ReloadScripts(Index) Exit Sub Case "custommenuclick" Call Packet_CustomMenuClick(Index, Val(Parse(1)), Val(Parse(2)), Parse(3), Val(Parse(4)), Parse(5)) Exit Sub Case "returningcustomboxmsg" Call Packet_CustomBoxReturnMsg(Index, Val(Parse(1))) Exit Sub Case "loadupdates" 'loadupdates Dim onename As String Dim onepath As String Dim number Dim Path As Long Dim ending As Long Dim Amount As Long Dim update As Integer number = 1 Amount = ReadINI("UPDATES", "amount", App.Path & "\updates.ini", vbNullString) Do While number <= Amount onename = ReadINI("UPDATES", STR(number), App.Path & "\updates.ini", vbNullString) onepath = ReadINI("PATHS", STR(number), App.Path & "\updates.ini", vbNullString) Call SendDataTo(Index, "updates" & SEP_CHAR & onename & SEP_CHAR & onepath & SEP_CHAR & number & SEP_CHAR & Amount & END_CHAR) number = number + 1 Loop Exit Sub Case "getonline" Call Packet_GetWhosOnline(Index) Exit Sub Case "sendemail" Call Packet_SendEmail(Index, Parse(1), Parse(2), Parse(3), Parse(4)) Exit Sub Case "getmsgbody" Call Packet_EmailBody(Index, Parse(1), Parse(2), Parse(3)) Exit Sub Case "dltmsg" Call Packet_RemoveMail(Index, Parse(1), Parse(2), Parse(3)) Exit Sub Case "updateinbox" Call Packet_MyInbox(Index, Parse(1), Parse(2)) Exit Sub Case "checkchar" Call Packet_CheckChar(Index, Parse(1), Parse(2), Parse(3), Parse(4)) Exit Sub End Select Call HackingAttempt(Index, "Received invalid packet: " & Parse(0))End SubPublic Sub Packet_GetWhosOnline(ByVal Index As String) Call SendDataTo(Index, "totalonline" & SEP_CHAR & TotalOnlinePlayers & SEP_CHAR & END_CHAR)End SubPublic Sub Packet_GetClasses(ByVal Index As Long) Call SendNewCharClasses(Index)End SubPublic Sub Packet_NewAccount(ByVal Index As Long, ByVal Username As String, ByVal Password As String, ByVal Email As String) If Not IsLoggedIn(Index) Then If LenB(Username) < 6 Then Call PlainMsg(Index, "Your username must be at least three characters in length.", 1) Exit Sub End If If LenB(Password) < 6 Then Call PlainMsg(Index, "Your password must be at least three characters in length.", 1) Exit Sub End If If EMAIL_AUTH = 1 Then If LenB(Email) = 0 Then Call PlainMsg(Index, "Your email address cannot be blank.", 1) Exit Sub End If End If If Not IsAlphaNumeric(Username) Then Call PlainMsg(Index, "Your username must consist of alpha-numeric characters!", 1) Exit Sub End If If Not IsAlphaNumeric(Password) Then Call PlainMsg(Index, "Your password must consist of alpha-numeric characters!", 1) Exit Sub End If If Not AccountExists(Username) Then Call AddAccount(Index, Username, Password, Email) Call PlainMsg(Index, "Your account has been created!", 0) Else Call PlainMsg(Index, "Sorry, that account name is already taken!", 1) End If End IfEnd SubPublic Sub Packet_DeleteAccount(ByVal Index As Long, ByVal Username As String, ByVal Password As String) Dim I As Long If Not IsLoggedIn(Index) Then If Not IsAlphaNumeric(Username) Then Call PlainMsg(Index, "Your username must consist of alpha-numeric characters!", 2) Exit Sub End If If Not IsAlphaNumeric(Password) Then Call PlainMsg(Index, "Your password must consist of alpha-numeric characters!", 2) Exit Sub End If If Not AccountExists(Username) Then Call PlainMsg(Index, "That account name does not exist.", 2) Exit Sub End If If Not PasswordOK(Username, Password) Then Call PlainMsg(Index, "You've entered an incorrect password.", 2) Exit Sub End If Call LoadPlayer(Index, Username) For I = 1 To MAX_CHARS If LenB(Trim$(Player(Index).Char(I).Name)) <> 0 Then Call DeleteName(Player(Index).Char(I).Name) End If Next I Call ClearPlayer(Index) ' Remove the users main player profile. Kill App.Path & "\Accounts\" & Username & "_Info.ini" Kill App.Path & "\Accounts\" & Username & "\*.*" ' Delete the users account directory. RmDir App.Path & "\Accounts\" & Username & "\" Call PlainMsg(Index, "Your account has been deleted.", 0) End IfEnd Sub``` 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