Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
574
Reaction score
147
First Language
Engilsh
Primarily Uses
RMMV
I have set up a simple web system were the game pulls a version number from the server,


How it works:


Game retrieves the version number from the servers rb file version.rb which contains the following code:


$server_version = 0.1


Then it evals the version.rb file to inster the global variable into the game,


The game compares the $server_version to the $client_version using this code:


if $client_version != $web_version then
$game_temp.reserve_common_event(2)
end

# This is run inside of an in-game event.


this should simply run the common event if the two numbers are different,


so I changed the $client_version to 0.0,


if my math is correct 0.0 does not equal 0.1,


so why isn't the common event starting?
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
Have you tried debugging it? like seeing if the if actually turns true?


if $client_version != $web_version then
p "true"
$game_temp.reserve_common_event(2)
end


this should print out true if the condition is true which then means the problems lies on the actual common event call..


TBH, since ur doing it in an event you could just use the default conditional branch event command and go to third tab to use a script call based condition and call the common event using the default event command too


CommonEvent.PNG
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
574
Reaction score
147
First Language
Engilsh
Primarily Uses
RMMV
Edit: It did print true, I was looking at the wrong thing, but the common event still doesn't run.


48128ff66b324f2bbeec7929f27d39a1.png
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,634
Reaction score
1,452
First Language
French
Primarily Uses
RMMV
if $client_version != $web_version then
$game_temp.reserve_common_event(2)
end

# This is run inside of an in-game event.

did you try 

Code:
//not equal value or not equal type    
x !== 5
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
Did you try to use the event method that I posted?
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
574
Reaction score
147
First Language
Engilsh
Primarily Uses
RMMV
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!
I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

I've started working on rpg maker again, and I can see a lot of improvement from when I was 13. I still have a long way to go, but I'm proud that I've gotten this far.
Animated Title screen is by SharkerrBlue(SB)
I am using the Nightmare Land pack.
I just can't walk to the store for lunch without walking past people smoking. It not only smells bad, it's probably poisoning me. I'm afraid I'll eventually have to be hospitalized. I can't take another path because there's too much traffic and drivers in the plaza are reckless sometimes. I almost got run over once, even after looking both ways.
RyanYe wrote on whtdragon's profile.
Your art works about Wyrvens and Dragons are sooooooooo cooooooooool~! I like them so bad
Can you create more? like Archangels, Devils, Titans, Cyclops!!

Forum statistics

Threads
108,808
Messages
1,039,634
Members
141,254
Latest member
wuyuzhi
Top