Just a suggestion:
You should try proper identation.
If you use visual studio, it has a built in formatting to help you.
With formatting we can quickly see that reading the code might be difficult for others:
Even though the code is fine, it is hard to read since all the IF statements are nested in the else blocks.
Also on the last else block you have not encased the whole block inside the braces, which is a possible error, but doesnt matter in the current code.
After removing the "else" keywords and by formatting the code properly again the code looks a lot more readable for me personally at least.
There is also smaller chance of error when you can see that everything goes correctly: http://prntscr.com/6ccmpk
I see you used SendAreaTriggerMessage with red color. You can send a red error message looking notification to player with plr->GetSession()->SendNotification.
Just incase you didnt know.
If this is a release, why was it in the support section? Moved to release section.
Thanks for sharing.
- View the Rules before making any decision
- EmuDevs is supported by ads and the community. Disable EmuDevs and sites associated with ED on your AdBlock.
- Check EmuDevs' Twitter
- EmuDevs SQL Generator
- Emudevs FAQ
- I had to make a new account, was my old account deleted?
- Give more information about your Support Issue
- Eluna FAQ
- How can I correctly help a member?
Show EmuDevs your new #attitude!
There are currently 1 users browsing this thread. (0 members and 1 guests)