[XP] Global Switches and Variables for RMX-OS

Started by Blizzard, January 07, 2010, 02:25:30 pm

Previous topic - Next topic

Blizzard

Then you'll have to ask nathmatt to take a look at it. Try posting in his topics, I'm not sure if he reads other script topics.
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.

ojp2010


nathmatt

blizzard it seems to be caused by this

Spoiler: ShowHide
alias check_game_gswivar_later check_game
  def check_game(message)
    case message
    when /\AGSW(.+)\t(.+)/
      $game_temp.disable_global = true
      $game_switches[$1.to_i] = ($2 != '0')
      $game_temp.disable_global = false
      $game_map.need_refresh = true
      return true
    when /\AGVA(.+)\t(.+)/
      $game_temp.disable_global = true
      $game_variables[$1.to_i] = $2.to_i
      $game_temp.disable_global = false
      $game_map.need_refresh = true
      return true
    end
    return check_game_gswivar_later(message)
  end


when i set $game_map.need_refresh = true it seemed to work
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

What do you mean? Where did you set it to true?
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.

nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

*takes a look at the script posted in the first post* O_o It says true in that part of the script.
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.

ojp2010

Maybe somehow I tipped it to false or changed it to false thinking it was something else. I am not sure, it works fine now though. :) thanks for the help guys.

Guilink

Using the new version of this script and the script RMXOS, this system has stopped working, please check this.

This error occurs when I try to change a switch or a variable global:



Server side error:



Thank you


Waiting for BABS Controller for RMX-OS update! '-'

www.manaextreme.blogspot.com (my brazilian game-newblog)

RoseSkye

March 14, 2011, 11:09:44 am #48 Last Edit: March 14, 2011, 12:32:51 pm by RoseSkye
in the .rb file you need to comment that line until Blizz fixes it.

Blizzard

I fixed it. You just have to change that line in th extension to "log" instead of "logs".
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.

$3B

July 13, 2012, 10:16:51 pm #50 Last Edit: July 14, 2012, 05:12:54 pm by $3B
Hi, well, I have a problem, I have the correct order, and I have the same config in extension and client, and when I activate a global switch, the client and the server gives me an error. What should I do?
"If you win, win with joy, if you lose, lose with honor."
You don't understand? Just don't bother

ForeverZer0

Describe the error more specifically, such as the error name, message, and line number if you want someone to be able to help.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

$3B

Quote from: ForeverZer0 on July 13, 2012, 10:37:33 pm
Describe the error more specifically, such as the error name, message, and line number if you want someone to be able to help.
Well, my error is in the line 77 from the global switches extension. All the config is the same, both in client and extension
"If you win, win with joy, if you lose, lose with honor."
You don't understand? Just don't bother

ForeverZer0

Quote from: ForeverZer0 on July 13, 2012, 10:37:33 pm
Describe the error more specifically, such as the error name, message, and line number if you want someone to be able to help.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

$3B

The server gives me an error in the line 77 of the extension, in the one that says : self.client_update, and the client gives me an error saying that the connection was anuled by the host, that's my error.
"If you win, win with joy, if you lose, lose with honor."
You don't understand? Just don't bother

Lokar

January 16, 2013, 03:38:14 am #55 Last Edit: January 16, 2013, 03:48:02 am by Lokar
I'm getting a client crash any time I change a global variable or switch in game. My script order is RMX-OS Options, RMX-OS Script, Global Switches and Variables, and lastly RMX-OS Main. Both the script and the .rb file have the same switches/variables listed. The config file has the extension enabled. I'm not sure if I need to make the .dat files, as they do not exist. If I do, I'm clueless about what to put in them. I've played around with the whole thing, hoping for a miracle. I've deleted it and put in a fresh copy, I've tried just about everything I could before posting, with no luck. :(

Here is the server cmd output.
Spoiler: ShowHide


Here is the client output error.
Spoiler: ShowHide


Any help would be appreciated and you would have my undying gratitude. Thanks in advance.  :)

Blizzard

Did you add the server extension for the Global Switches and Variables script?
You don't need to create the .dat files yourself, RMX-OS takes care of that for you.
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.

Lokar

January 16, 2013, 05:47:56 am #57 Last Edit: January 16, 2013, 07:00:55 am by Lokar
Quote from: Blizzard on January 16, 2013, 05:11:55 am
Did you add the server extension for the Global Switches and Variables script?
You don't need to create the .dat files yourself, RMX-OS takes care of that for you.


In the config file? Yes. It looks like:
EXTENSIONS = ['Global Switches and Variables']

The Global Switches and Variables.rb file is in the Extensions folder as well. When I start the server running, line 5 in the cmd says Global Switches and Variables was loaded and initialized, so I assumed it's working fine. But the second the switch changes in game, the client who changed it bugs out with the error in my last post. I can't imagine it has anything to do with the event in the editor, it's just a simple turn switch on command.

Here is what the error log printed out. Hopefully it helps.
Spoiler: ShowHide
2013-01-16 10:53:24 UTC; 1 (Kyle) - Error:
deadlock; recursive locking
<internal:prelude>:8:in `lock'
<internal:prelude>:8:in `synchronize'
<internal:prelude>:27:in `exclusive'
./Extensions/Global Switches and Variables.rb:77:in `client_update'
Data/Client.rb:43:in `block in handle'
Data/Client.rb:43:in `each_value'
Data/Client.rb:43:in `handle'
Data/Server.rb:276:in `block (2 levels) in run'
<internal:prelude>:28:in `block in exclusive'
<internal:prelude>:10:in `synchronize'
<internal:prelude>:27:in `exclusive'
Data/Server.rb:274:in `block in run'


Thanks so much for helping! :)

UPDATE:
I think I fixed it, here's what I did. Line 77 for switches and 88 for variables, in the .rb file, had the problem, so I just commented that line, and its ending bracket, for both the switches and variables. The .dat files showed up after the test. Registered a new account, jumped in, and sure enough the switch change was there. I'm not sure if those specific lines are necessary, but I thought I'd let you know, in case you wanted to look at it.

Thanks again for RMX-OS Blizzard, I've had a blast playing with it! :)

Blizzard

January 16, 2013, 03:54:47 pm #58 Last Edit: January 22, 2013, 02:09:50 pm by Blizzard
Thanks, I'll check it out and fix it if there is a bug (it's looks like it is).

EDIT: I finally took a look at the script. The original was made for RMX-OS 1.18 while in RMX-OS 1.2x the message handling already is thread-safe so that Thread.exclusive call that was causing the problem isn't needed anymore. I updated the script to 1.2 and now it requires RMX-OS 1.21 to run.
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.

Scitz

January 30, 2013, 12:15:48 am #59 Last Edit: January 30, 2013, 12:18:11 am by Scitz
I have a question..

I have flowers on the map that u can pick up (its a event ofc)
when u pick them up global switch A goes on, then the 2nd page of the event says

If global switch A = on
Wait 999
wait 999
Set global switch A = off

(when global switch A is on the flower goes away, when switch goes off flower comes back)

Though it only comes back when i wait the 2times 999 frames on the map were the event is located.
So if no-one is in that map, than the event does not run am i right?

Well my question is:

How can i make the event to contineu even when no-one is on the map?

Thanks in advance.