Skip to content

Commit

Permalink
Fixed save slot bug
Browse files Browse the repository at this point in the history
  • Loading branch information
milesthenerd committed Mar 15, 2021
1 parent 22452bb commit 8ee3329
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
29 changes: 28 additions & 1 deletion objects/oLoad.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events>
<event eventtype="2" enumb="1">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string></string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" enumb="0">
<action>
<libid>1</libid>
Expand Down Expand Up @@ -49,7 +71,6 @@
<kind>1</kind>
<string>if(instance_exists(oServer)){
with(oServer) event_user(2);
alarm[0] = 120;
}
</string>
</argument>
Expand Down Expand Up @@ -79,6 +100,12 @@ if(alarm[0] &gt; 0){
draw_text(x - 12, y + 12, "Loaded slot " + string(global.slot) + "!");
draw_set_halign(fa_left);
}

if(alarm[1] &gt; 0){
draw_set_halign(fa_right);
draw_text(x - 12, y + 12, "Save " + string(global.slot) + " doesn't exist!");
draw_set_halign(fa_left);
}
</string>
</argument>
</arguments>
Expand Down
3 changes: 3 additions & 0 deletions objects/oServer.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,9 @@ switch(type_event){
ds_list_destroy(list);
alarm[2] = 30;
alarm[5] = 30;
oLoad.alarm[0] = 120;
} else {
oLoad.alarm[1] = 120;
}

</string>
Expand Down
2 changes: 1 addition & 1 deletion objects/oSlot.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<arguments>
<argument>
<kind>1</kind>
<string>if(oLoad.alarm[0] &lt; 0 &amp;&amp; oSave.alarm[0] &lt; 0){
<string>if(oLoad.alarm[0] &lt; 0 &amp;&amp; oSave.alarm[0] &lt; 0 &amp;&amp; oLoad.alarm[1] &lt; 0){
global.slot++;

if(global.slot &gt; 3){
Expand Down

0 comments on commit 8ee3329

Please sign in to comment.