Page 1 of 1

Wow its been a long time

Posted: Fri Oct 05, 2018 10:50 am
by lore7460
Greetings Everyone,

Its been a long time since I last visited the forms. I've been playing on a true server and have reached the end of my rope.
Scripting has kept me engaged in the game for many many years and without it I tend to get board really quick, i guess I'm more about writing the scripts than playing the game.
Once you get something working perfectly its time to work on a different one, a never ending battle with the engine and the code.

I'm looking at jumping back into a old server and trying to reignite the fire again.
So that brings me to this post, I'm just curious of the state of MQ2 and how development been going and if its still in use.
I'm also curious about what kind of hit the project got going to that third party compiler service?

Either way; Hope to hear back from you all soon.

Safe travels. :smile:

Re: Wow its been a long time

Posted: Fri Oct 05, 2018 6:30 pm
by dewey2461
This should be a FAQ somewhere but here is the short form.

Some people were taking the source code here and worked around the safe guards eqMule had put in to make it work on the truebox servers and the shit hit the fan. As a result the only fully working source code that is being released is for test.

Your options are:
1 - download/compile and play on the test server (free)
2 - sign up for the "build service" $50/yr
- Can upload custom plugin source code but it has to be authenticated by eqmule ( no active hacks )
- eqMule has many of the standard plugins maintained - just click check marks to include them
3 - sign up for one of the two other pay sites ( bugs or guides ) and use their stuff.

There has been some significant changes in the way macros work. You will want to place the keyword #warning at the top to catch undefined variables, as they no longer just return NULL. The other major change is passing parameters into functions. Double check that you pass everything in or unexpected results occur.

Which ever way you choose to go . Welcome back.

Re: Wow its been a long time

Posted: Sun Oct 07, 2018 5:46 pm
by lore7460
Thank you very much,
I'm up and running again.

Ran into a interesting issue where a boolean check on a blank string was returning back true. I coded around it. didn't see anything like that in my searches figured I'd post it maybe someone else is running into that issue.

All good, I'm back :)

Re: Wow its been a long time

Posted: Sun Oct 07, 2018 6:58 pm
by dewey2461
lore7460 wrote:
Sun Oct 07, 2018 5:46 pm
Thank you very much,
I'm up and running again.

Ran into a interesting issue where a boolean check on a blank string was returning back true. I coded around it. didn't see anything like that in my searches figured I'd post it maybe someone else is running into that issue.

All good, I'm back :)
Can you post a small test case to show what you were doing?

Re: Wow its been a long time

Posted: Wed Nov 07, 2018 7:08 pm
by wired420
lore7460 wrote:
Sun Oct 07, 2018 5:46 pm
Thank you very much,
I'm up and running again.

Ran into a interesting issue where a boolean check on a blank string was returning back true. I coded around it. didn't see anything like that in my searches figured I'd post it maybe someone else is running into that issue.

All good, I'm back :)
A boolean check on a string will generally return true as long as it exists and isn't directly defined as "false". Some languages like python and php have an extra operator for handling this such as === which forces exact matches.

If you want to do as descripted you need to define a boolean function that always directly returns true or false based on that variable

Code: Select all

function myBool ($getBooled = false) {

  // check if the string is in fact the word true, true, or 1. Covering all three use cases of true.
  if ($getBooled == 'true' || $getBooled == 1 || $getBooled == true) { return true; }

  // For ALL other cases assume false
  else { return false; }
  return false;
}

// What ever string variable you're checking here in place of 'ihavetobool'
if (!$myBool($ihavetobool)) { // code here }
That would be the common work around for it. Of course it'd need to be converted for macro. Luckily in cases where you use it a lot (Database work... Yuck...) it's reusable.