-
Posts
3,655 -
Joined
-
Last visited
-
Days Won
12
Content Type
Profiles
Forums
Events
Everything posted by a_bertrand
-
Indeed... should be "not to". The official modules will continue to use the column number instead of the name. So you will be free to enable or not the loading via text. For a second way to access the data it would be possible but maybe not very intuitive... I'm unsure here.
-
Well I hardly see the problem, you just count the columns and know which one it is. A very good reason also to not work with select * ;) The main concern is the performance hit. But that's then matter of the game owner / coder. An option to enable / disable this features will be put in the config.php
-
Ok I think I managed to do something which: 1) Doesn't break anything we currently have 2) Let you access the data as $result->fields[0] or $result->fields['id'] or $result->fields->id It certainly has some speed penalty, how much? well you will have to check. I will send you via email the code Someone, please comment it back, as if you like it I will include it in the next release. BTW in my development version I added a config flag which let you choose to use this feature or disable it and only access via column position. Multiple ways to access your data now: $result=$db->Execute("select id,username from users"); // Using a while loop while(!$result->EOF) { // Old access is still valid echo "{$result->fields[0]}, {$result->fields[1]}<br>"; // Accessing via column name index echo "{$result->fields['id']}, {$result->fields['username']}<br>"; // Accessing it like an object echo "{$result->fields->id}, {$result->fields->username}<br>"; $result->MoveNext(); } $result->Close(); $result=$db->Execute("select id,username from users"); // Using a foreach foreach($result as $row) { // Works here as well as object echo "{$row->id}, {$row->username}<br>"; // Or foreach inside the $row (however the $k is a number not the column name) foreach($row as $k => $v) { echo "$k=$v, "; } echo "<br>"; } $result->Close();
-
Well first you would need to wait till you get McCodes V3 as the (yet again) deadline is over...
-
I think I found an elegant solution which should do the trick. I will try to implement it and let you know.
-
So basically you would want to show whatever html there. Well currently it's not supported. I would suggest then to rework the inside_menu and run hooks which output content maybe instead of the menu structure. Drawback is that you would then need to replicate some of the features across many modules. So far I don't have really a nicer option to give. Another option is to avoid that, and instead use a div with your content on some side but not placed in between the menu.
-
Will check how to do it properly. Not fully sure honestly as the DB class is a bit of a pain. Mainly due to the simplifications it gives to the usage, like hide the MySQLi prepare statement and such.
-
New crime module available
a_bertrand replied to a_bertrand's topic in Paid modules (requests or offers)
Thanks ;) wasn't hard to create. -
Free for all full owners a new module "Crime" is available from the marketplace. It allows you to define as many crimes as you want (from the table editor), let you define conditions when the crime can or cannot be done, what stats counts on the % success rate, the cost (and the stat of the cost), time in jail in case of failure (in minutes), as well as the effect if you succeed. I hope it gives enough flexibility ;)
-
Fixed thanks for the report.
-
Fixed thanks for the support 1331
-
Honestly, for a small game I doubt you will see much of a difference, yet, the more load you get the more those small difference can count. So I don't know.
-
It's faster to not get back the column name. That's what PHP manual says, and that's why I don't get it so far.
-
Thanks will fix that tomorrow in the official package.
-
Easy enough, follow what PHP tells you: # comments are old style and should be replaced with //
-
What Module Would You Pay For
a_bertrand replied to gmoore's topic in Paid modules (requests or offers)
You can certainly convert mods from and to NWE. You may want to check also the mod converter here: http://www.nw-engine.com/index.php?c=mc2_converter However think this is just a first step and will certainly not do all the work automatically. -
What do you need to do? I mean what do you need that the current system doesn't offer?
-
Ok that's not hard, will do it on Monday hopefully.
-
Well it took approximately 3 hours from the question to the full answer with bug fix. I would say it's not too bad either ;) Specially count that on the weekend I'm not glued to my PC.
-
Indeed you are way too slow 1331 :P (kidding of course). It way initially accessible however after I cleaned up the admin panel and added the right side quick links, it disappeared. Until today where I was trying to remember where it was and I discovered the issue.
-
What Module Would You Pay For
a_bertrand replied to gmoore's topic in Paid modules (requests or offers)
Casino games are actually in my todo list just after the crime. You may have some already next week. Of course free to all full owners ;) -
Indeed. Thanks for the report. Update the view_player module and it should be up and running. And removed my pict from the avatar. Sorry was to test that this was working and forget it there.
-
No srachit, that's wrong. First update the module called admin_side_menu, somehow it missed to show the configuration keys of the core. That is now fixed. Once updated, you will find a configuration key called Currency Stat which is set by default to Gold. Change it to whatever you want and you will have it immediately. Why do you need to leave the stat !Currency? Because all modules and the core itself work with this stat in a special manner. For example to translate !Currency in the wished currency you use.
-
DB contains: Name, Description, Condition when it's available, Cost (AP), Success rate, Effect in case of success, time in jail in case you fail. Then a page which let you browse all possible crimes, you pick on, (if you are allowed) then again the success is calculate and you succeed or fail the crime. You will then have a cool down period before being able to commit a crime again. Cool down period is customizable. The other data is directly in the table so all is basically editable.
-
Are those images or CSS based? If they are images you could cache the result on the server. I'm myself working on a crime module to be included in the full version. Should be ready next week.