![]() |
EliteMsg...lol - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: EliteMsg...lol (/showthread.php?tid=2245) |
EliteMsg...lol - Nean - 15-10-2008 So yeah, for shits and giggles, I tried liquidating the AdminMsg into EliteMsg, so that only level 100's can send and see the messages. But it won't work. I don't get kicked for bad packets, or anything, but it doesn't show the EliteMsg, like it should, instead it shows *Message (* is the trigger) I was just going to leave it, because it was only to see if I could make it, but then I realized that I'll never get any better, if I don't learn what to look for when something doesn't work. I literally spent hours on this. I'd really appreciate any help. Here's the code. [spoiler]Server Side Code: Sub EliteMsg(ByVal Msg As String, ByVal Color As Byte) Code: CEliteMsg Code: SEliteMsg Code: Case CEliteMsg Code: Sub HandleEliteMsg(ByVal Index As Long, ByRef Parse() As String) Client Side Code: Sub EliteMsg(ByVal Text As String) Code: CEliteMsg Code: SEliteMsg Code: Case SEliteMsg Code: Sub HandleEliteMsg(ByRef Parse() As String) Re: EliteMsg...lol - GIAKEN - 15-10-2008 GetPlayerLevel(i) = "100" ? Re: EliteMsg...lol - Nean - 15-10-2008 I might not be thinking, but isn't that whats supposed to check if the user is level 100, and then send the message? Re: EliteMsg...lol - Coke - 15-10-2008 Literally all you needed was to replace the access check with a level > x check... xD ... which (after looking at your code) is what you have nearly done ^__^ Re: EliteMsg...lol - Nean - 15-10-2008 Nearly? DAMNIT. What did I miss? What am I doing wrong? I've looked over this code so much, It must be really obvious too. Re: EliteMsg...lol - GIAKEN - 15-10-2008 GetPlayerLevel(Index) = "100" You're checking if their level is equal to the word "100". Replace all those GetPlayerLevel checks with > 100. Re: EliteMsg...lol - Nean - 15-10-2008 If the level cap is level 100, than how could it be greater? And I wanted it to be availiable for those who are level 100's only, so wouldn't: If getplayerlevel(index) = 100, be what I'm looking for? *sigh*. I guess I'll try, GetPlayerLevel >= 100, and see if that works. :| Re: EliteMsg...lol - Rian - 15-10-2008 There's a difference between If GetPlayerLevel(index) = "100" and If GetPlayerLevel(index) = 100 The latter should work. The function GetPlayerLevel returns a numeral. "100" is a string. Re: EliteMsg...lol - Nean - 15-10-2008 Ohhh, I see. I changed them all to 100 without, the quotes, and yes, I am level 100. Didn't work. hehef orgot to add that. Re: EliteMsg...lol - Nean - 15-10-2008 Honestly though, I can't see anything I've done wrong. I found every instance of AdminMsg, and below it I made the EliteMsg, I can't find any reason why this doesn't work. Re: EliteMsg...lol - GIAKEN - 15-10-2008 Try removing your GetPlayerLevel checks to see if it actually works then you know what's wrong. Re: EliteMsg...lol - Nean - 15-10-2008 GIAKEN Wrote:Try removing your GetPlayerLevel checks to see if it actually works then you know what's wrong. You're a fucking genius. Yeah, it works without the levelchecks. Now I know where to go about fixing this, if possible. Re: EliteMsg...lol - GIAKEN - 15-10-2008 Code: If GetPlayerLevel(Index) >= 100 Then That's what you should use. Re: EliteMsg...lol - Nean - 15-10-2008 Didn't work. I slowly unnulled stuff out, until I isolated it to this: Code: If Left$(ChatText, 1) = "*" Then Code: Call EliteMsg(ChatText) EDIT: Nevermind, I took out the level check from there, and it works fine. I tried sending it w/ my level 100, and my level 1 didn't pick it up. I set my level one to, level one-hundred, and I could send messages back and forth to my peeps. This is safe, right? Re: EliteMsg...lol - GIAKEN - 15-10-2008 Uhhh maybe...you should do some more testing. I had this kind of idea for my game Surviving the Systems ![]() ![]() |