[XP] Blizz-ABS Controller for RMX-OS

Started by Blizzard, January 17, 2010, 05:02:36 pm

Previous topic - Next topic

Wizered67

I have yet to test on more than one computer, but I believe that doing do may fix the gmaster only attacking bug. Before, I had been testing it with 2 clients on my computer. Since I couldn't have both open at the same time(one had to be minimized) it explains that the other one that wasn't the gmaster couldn't properly get the data from the gmaster. I am wating for my friend so that /i can confirm this.

Noob

OKay....well I was trying from two PCs that are in my house connected on the same IP Address so idk if that had anything to do with it. All the rest of the time I've just been working with two clients open @ once, like you. Just to make it more convenient for anyone who would like to attempt to debug my problem, here's my post about it from the last page:

Quote from: Noob on February 05, 2011, 12:43:05 pm
EDIT: Blizzard, I got it to work consistently, but with a rather large problem. The first person to log in after starting the server can successfully battle enemies. But if they access the menu, they get this error:

Sat Feb 05 13:58:51 Central Standard Time 2011:
An established connection was aborted by the software in your host machine.
RMX-OS Script:2267:in `check'
RMX-OS Script:2222:in `recv'
RMX-OS Script:827:in `listen'
RMX-OS Script:3618:in `upd_blizzabs_later'
Blizz-ABS Part 3:6805:in `update'
Scene_Map:25:in `main_rmxos_later'
Scene_Map:19:in `loop'
Scene_Map:30:in `main_rmxos_later'
RMX-OS Script:3606:in `main_blizzabs_later'
Blizz-ABS Part 3:6713:in `main_blizzabsrmxos_later'
blizzabsrmxos:933:in `main'
RMX-OS Main:46
When they, or anyone else logs back in, enemies are unfightbale but remain in the position/HP amount they had when the first person to log in was fighting them. to see if I could get around this, I tried getting two people to log in quickly before the first person got that error. The second person got this error:
Sat Feb 05 13:58:41 Central Standard Time 2011:
undefined method `has_key?' for nil:NilClass
blizzabsrmxos:511:in `update_online_enemy'
blizzabsrmxos:393:in `check_game'
RMX-OS Script:845:in `listen'
RMX-OS Script:844:in `each'
RMX-OS Script:844:in `listen'
RMX-OS Script:5623:in `update'
RMX-OS Script:5255:in `main'
RMX-OS Script:5252:in `loop'
RMX-OS Script:5257:in `main'
RMX-OS Main:46
After that, no one experieced any errors, but the enemies were unfightable to everyone. However, they were in different positions and you could see on their lifebar the damage that the first person to log in had done in the brief time beore getting the error. I believe if you can fix these two errors, you'll have it running perfectly.
Note: For me, the first person to lo in after starting the server always gets that top error.

EDIT: I've found that the erorr I talked about above (the first one) only comes up some of the time. The rest of the time, everything works fine for the GMaster until I use a skill on an enemies (Skills work on players, you see damage, but they don't reduce their HP or affect them). If yo use a skill on an enemy, the script "hangs." I've confirmed Wizered's report that only the GMaster can fight enemies. I went on from two different PCs and only the GMaster was able to fight the enemies. Please fix these problems. In a moment I'll post the error I got when the GMaster used a skill. Also, it's still not writing any logs. And everything works fine when I test it with the server running on my PC.

Agian, another EDIT: Here is the error I get when the GMaster tries using a skill on a blizz-abs enemy (skills seem to work on players but don't actually do anything to them because as I said, only the GMaster can participate in blizzabs battles.)
The error is:
Sat Feb 05 15:51:07 Central Standard Time 2011:
(eval):1:in `check_game'compile error
(eval):1: unterminated string meets end of file
(eval):1: syntax error
{"@direction"=>2, "@real_x"=>9728, "@real_y"=>5760, "@x"=>76, "@battler|@states"=>[], "@ai|@negative"=>[1, 3, 5, 6], "@y"=>45, "@character_name"=>"BlackCat", "@ai|@view_range"=>5, "@ai|@altered_alignment"=>false, "@battler|@enemy_id"=>7, "@ai|@neutral"=>
  • , "@ai|@positive"=>[2], "@move_speed"=>3, "@battler|@sp"=>9999, "@ai|@hearing_range_ratio"=>40, "@battler|@state_time"=>{}, "@battler|@hpPNG
                                                                                                                                                                                                                                                                                                                                                                                                                ^
    blizzabsrmxos:392:in `check_game'
    RMX-OS Script:845:in `eval'
    blizzabsrmxos:392:in `check_game'
    RMX-OS Script:845:in `listen'
    RMX-OS Script:844:in `each'
    RMX-OS Script:844:in `listen'
    RMX-OS Script:3618:in `upd_blizzabs_later'
    Blizz-ABS Part 3:6805:in `update'
    Scene_Map:25:in `main_rmxos_later'
    Scene_Map:19:in `loop'
    Scene_Map:30:in `main_rmxos_later'
    RMX-OS Script:3606:in `main_blizzabs_later'
    Blizz-ABS Part 3:6713:in `main_blizzabsrmxos_later'
    blizzabsrmxos:933:in `main'
    RMX-OS Main:46

    If this has something to do with that anime count thing or whatever that you told me I could delete, just tell me because I haven't deleted it yet. Thanks very much in advance for anything you do to fix this. :) Good luck.

Wizered67

You did try from 2 computers? That pretty much disproves my theory. Were you hosting the server on that website you keep mentioning when you did the testing? Considering all of the problems you've had since you starting using it, you should try hosting the server on one of the two computers to do the testing. Just my opinion though.

Noob

When I host it on my computer, everything works fine. Yea, I get the occasional crash or stack overflow, but for the most part, everything (And I do mean everything, pvp, team pvm, chat, trading, etc.) works fine. It's when I test it running the server from vlexofree.com that it fails. I'd run the server from my comp. permanently, but hundreds of people are going to be playing this, and that would just laggggggg the heck out of my computer, and also be un-secure.

Wizered67

Wow, you have high hopes for your game. Not that thats a bad thing. Anyway, it seems to me that because your hosting it on that website, the server isn't doing something that its supposed to be. Are the extensions crashing or something?

Noob

No idea. It doesn't even write the extensions. Thats one of the wierd things about vlexofree. And about my high hopes, you see, I already have a single player version that hundreds of people play. I'll give them all the opportunity to convert to multiplayer.

Wizered67

What's your game? I want to try it.  :)

By the way, have you gotten the error I posted last page before about undefined method pages?

Noob

February 05, 2011, 07:30:25 pm #247 Last Edit: February 05, 2011, 07:58:37 pm by Noob
EDIT: IT WORKS!!!!! I did the fix that I said below, that blizzard suggested, and it WORKED! Wizered try it. Go to the extension file and type CTRL + F (search) and type in ./ and it should bring you to the place in the file where you put in the log path. Just delete that entire thing so it's just '' with nothing inside. Then try running the game. I got it to work with two clients open on the same comp. Thank you so much blizzard. I believe that's the last glitch that needed fixing. I'll tell you if I come accross others.
EDIT: Maybe not completely. I left the game with both accounts. Came back a few minutes later. Got the same problem as earlier.
EDIT again: Ok.....actually it may work after all. What seems to have caused my momentary horror about it not working is that for some reason it didn't log out the GMaster. So the GMaster was "logged in" but actually logged out. So what it thought it was the GMaster was not, so nothing worked. And I have the zombie client thing set to true, but it says that the account that was the GMaster was "already logged in." Hmmm........

I have never gotten the pages error wizered, sorry. Blizzard, I forgot to try your suggested fix about completely turning off the blizzabs logging. (EDIT >>>>) I tried, it, and...it worked, as you can see above.

Ryex

you do know that unless you have an on-map menu system that your going to have errors when ever you access the menu right? make sure your useing a RMX-OS compatible menu system.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Noob

Okay...I have one other problem. A huge problem. the GMaster, as blizzard said, is the first person to enter the map. While they are on the map, everything works, if they exit the game, or leave the map, a new GMaster is NOT assigned. When they come back, they don't resume their role as GMaster. After they leave, that map cannot get a GMaster until the server is restarted. Something is causing it to not assign a new GMaster. I'm not sure what's happening with it, but something is definitely wrong. ryex, this happens even when I don't touch the menu.

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Noob

February 05, 2011, 09:12:05 pm #251 Last Edit: February 05, 2011, 10:44:52 pm by Noob
EDIT: Okay. It seems to me I've come down to two choices. I have a solution that would fix this, but it's kind of rudimentary and I'd prefer to use a cleaner fix. My fix is:
I copy the map 20 or so times. Then at the portal where people enter the PvP/blizz-abs battles map, they have a choice of 20 different "worlds." After someone uses each one, the glitch kicks in and obviously nobody can use it again until a server restart. If I find that 20 is too much, I'll lessen it. Too little, I'll increase it. I'll have to make copies of all my major blizz-abs maps, which could nearly double my total map count, which I'd really prefer not to do.

Instead, I'd like to pursue a clean fix. I now think my problem comes from the extension not properly reading/writing. It sets a GMaster, but never deactivates the GMaster, even if they leave. I need to know the following:
-Where does it keep track of the variable that controls whether a GMaster is set? (Server, GMaster's client, log file, etc.)
-Which file does the writing of the GMaster data?
-Which file does the reading of the GMaster data?
-Is the blizz-abs log crucial to keeping track of the GMaster?

thanks in advance for any and all help that anyone gives :)

Blizzard

February 06, 2011, 04:37:31 am #252 Last Edit: February 06, 2011, 04:43:57 am by Blizzard
Alright...

There is no explicit GMaster variable. On the client side there is a variable in network called @gmaster and it's set properly by the server. The server extension has a hash called @gmasters where it keeps track of all GMasters assigned for every map and a hash called @capable_clients where it keeps track of clients that can potentially be GMasters in case the current one gets disconnected.
When somebody connects, the message code MEN is sent (read the documentation for more information) and if there is no GMaster in the new map yet, the current one will be assigned.
The log is exactly what it says, it's just a log. If you turn it off, it won't write to a file what is going on makes it almost impossible to track errors and fix errors, but the server runs fine without logs.

Now, as for all your problems. If some unexpected error happens, the extension will crash. The thing is that it won't just crash, it will also shut down the server. That isn't happening with you which means that your host machine is somehow messed up badly. That's why enemies suddenly stop working.
The RMX-OS scripts work fine. You've said yourself that it works completely fine on your local machine. Only when you put it up on vlexo, you start getting problems. The problem is obvious, vlexo is causing you trouble. As far as I can see (from the 2-3 error messages you gave me), vlexo cuts off traffic as soon as the data string is a bit longer (which is ridiculous considering that the data strings are no more than a couple of hundreds of bytes) and refuses to write logs files (possibly because of file permissions) which you fixed by removing logging completely. It simply cuts off the message. RMX-OS cannot function if messages get cut off like that. RMX-OS is using a TCP connection which means either the message arrives as a whole or not at all. vlexo does not act as it is supposed to, it does not do it properly.
I think that the server extension crashes silently out of the exact same reason. The GMaster tries to send data about enemies to the other clients and because the string is too long, the server crashes in the extension code without properly shutting down the server.

I don't think I can do any more for you. vlexo is your problem, not RMX-OS. You should try to find another server to see how it behaves, possibly a Windows machine. You can even try to run it temporarily on your machine and ask a friend to connect remotely to your PC. This will show you that RMX-OS works fine for the intended environment which is a properly set up server on a Windows machine.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

so you know, if your getting a host shared hosting just isn't going to cut it. the host will disable or limit things that a game server can;t function with disabled or limited. at the very least you need a vps server which is going to cost you at least $15 a mounth. and If I were you I would look very sceptically at that $15 host and go for one that is charging $25-$25. otherwise your just not going to be able to run the server properly.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

It's that cheap? I don't think I've seen a good VPS for less than $100 per month.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

February 06, 2011, 06:22:29 am #255 Last Edit: February 06, 2011, 06:24:05 am by Ryex
well it's not like your getting great bandwidth or anything like that, http://www.hostv.com/vps-server.shtml#a_aid=xxxprvps&a_bid=de3a6091&chan=PRvps thats about as good as you can get for the 25-35 range without danger of being scammed. it will work for a small server like 50 players. of course windows servers are about double that or more.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Noob

okay. i will try finding a new host. i'll also look into changing the vlexo file permissions to possibly get the logs written. i dont think i'd be able to do a paid server, because my game is going to be free, and i dont want to be paying that price with no benefit :/ but thank you both very much anyway. :)

Blizzard

If you can upload the RMX-OS files onto the server machine via FTP, then you should be able to change the permissions as well. O_o
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Noob

February 06, 2011, 01:13:46 pm #258 Last Edit: February 06, 2011, 01:55:40 pm by Noob
EDIT: Now it's creating the blizz-abs log and it STILL doesn't work. I logged into the map with enemies as an account called Admin. Then I exited the game and went to a different map with enemies with an account called beta. The enemies were unresponsive. Here's what was in the blizz-abs log:
Client 'Admin' activate G-Master for map '113'.
Map '113' has been released.
Client 'Admin' activate G-Master for map '0'.
Map '0' has been released.
Client 'Admin' activate G-Master for map '19'.
Map '19' has been released.
Client 'Admin' activate G-Master for map '113'.
Map '113' has been released.
Client 'Admin' activate G-Master for map '19'.
Client 'Admin' deactivate G-Master for map '19'.
Map '19' has been released.

Not a single word about beta......I only gave the permission to a few files. I think now I'll give permissions to all of them and try again.
Client 'Admin' activate G-Master for map '19'.


Blizzard

If you chmod the logs folder to 777, everything should actually work fine.

The log is screwed up. For one, map 0 doesn't exist. Also, it assigns the Admin account as GMaster and right after it releases the map? Something isn't right.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.