| Mirage Source http://www.miragesource.net/forums/ |
|
| EliteMsg...lol http://www.miragesource.net/forums/viewtopic.php?f=201&t=4552 |
Page 1 of 2 |
| Author: | Nean [ Wed Oct 15, 2008 1:40 am ] |
| Post subject: | EliteMsg...lol |
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: (click to show)
|
|
| Author: | GIAKEN [ Wed Oct 15, 2008 2:05 am ] |
| Post subject: | Re: EliteMsg...lol |
GetPlayerLevel(i) = "100" ? |
|
| Author: | Lea [ Wed Oct 15, 2008 2:25 am ] |
| Post subject: | Re: EliteMsg...lol |
GIAKEN wrote: GetPlayerLevel(i) = "100" ? lol |
|
| Author: | Nean [ Wed Oct 15, 2008 2:34 am ] |
| Post subject: | Re: EliteMsg...lol |
I might not be thinking, but isn't that whats supposed to check if the user is level 100, and then send the message? |
|
| Author: | Coke [ Wed Oct 15, 2008 2:35 am ] |
| Post subject: | Re: EliteMsg...lol |
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 ^__^ |
|
| Author: | Nean [ Wed Oct 15, 2008 2:41 am ] |
| Post subject: | Re: EliteMsg...lol |
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. |
|
| Author: | GIAKEN [ Wed Oct 15, 2008 3:13 am ] |
| Post subject: | Re: EliteMsg...lol |
GetPlayerLevel(Index) = "100" You're checking if their level is equal to the word "100". Replace all those GetPlayerLevel checks with > 100. |
|
| Author: | Nean [ Wed Oct 15, 2008 3:47 am ] |
| Post subject: | Re: EliteMsg...lol |
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. |
|
| Author: | Rian [ Wed Oct 15, 2008 3:56 am ] |
| Post subject: | Re: EliteMsg...lol |
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. |
|
| Author: | Nean [ Wed Oct 15, 2008 4:23 am ] |
| Post subject: | Re: EliteMsg...lol |
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. |
|
| Author: | Nean [ Wed Oct 15, 2008 5:09 am ] |
| Post subject: | Re: EliteMsg...lol |
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. |
|
| Author: | GIAKEN [ Wed Oct 15, 2008 5:14 am ] |
| Post subject: | Re: EliteMsg...lol |
Try removing your GetPlayerLevel checks to see if it actually works then you know what's wrong. |
|
| Author: | Nean [ Wed Oct 15, 2008 5:28 am ] |
| Post subject: | Re: EliteMsg...lol |
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. |
|
| Author: | GIAKEN [ Wed Oct 15, 2008 5:32 am ] |
| Post subject: | Re: EliteMsg...lol |
Code: If GetPlayerLevel(Index) >= 100 Then That's what you should use. |
|
| Author: | Nean [ Wed Oct 15, 2008 5:34 am ] |
| Post subject: | Re: EliteMsg...lol |
Didn't work. I slowly unnulled stuff out, until I isolated it to this: Code: If Left$(ChatText, 1) = "*" Then If GetPlayerLevel(MyIndex) > 99 Then ChatText = Mid$(ChatText, 2, Len(ChatText) - 1) If Len(ChatText) > 0 Then Call EliteMsg(ChatText) End If MyText = vbNullString frmMirage.txtMyChat.Text = vbNullString Exit Sub End If End If I tried placing the level check everywhere above Code: Call EliteMsg(ChatText) , but it doesn't seem to work.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? |
|
| Author: | GIAKEN [ Wed Oct 15, 2008 5:47 am ] |
| Post subject: | Re: EliteMsg...lol |
Uhhh maybe...you should do some more testing. I had this kind of idea for my game Surviving the Systems |
|
| Page 1 of 2 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|