@@ -194,13 +194,13 @@ local function makescoregoal(i)
194
194
Def .Quad {
195
195
InitCommand = cmd (halign ,0 ;zoomto ,28 ,buttonheight ;diffuse ,getMainColor (' positive' );diffusealpha ,buttondiffuse ),
196
196
MouseLeftClickMessageCommand = function (self )
197
- if isOver (self ) and update then
197
+ if sg and isOver (self ) and update then
198
198
sg :SetRate (sg :GetRate ()+ 0.1 )
199
199
MESSAGEMAN :Broadcast (" UpdateGoals" )
200
200
end
201
201
end ,
202
202
MouseRightClickMessageCommand = function (self )
203
- if isOver (self ) and update then
203
+ if sg and isOver (self ) and update then
204
204
sg :SetRate (sg :GetRate ()- 0.1 )
205
205
MESSAGEMAN :Broadcast (" UpdateGoals" )
206
206
end
@@ -250,13 +250,13 @@ local function makescoregoal(i)
250
250
Def .Quad {
251
251
InitCommand = cmd (y ,goalrow2Y ;halign ,0 ;zoomto ,25 ,buttonheight ;diffuse ,getMainColor (' positive' );diffusealpha ,buttondiffuse ),
252
252
MouseLeftClickMessageCommand = function (self )
253
- if isOver (self ) and update then
253
+ if sg and isOver (self ) and update then
254
254
sg :SetPercent (sg :GetPercent ()+ 0.01 )
255
255
MESSAGEMAN :Broadcast (" UpdateGoals" )
256
256
end
257
257
end ,
258
258
MouseRightClickMessageCommand = function (self )
259
- if isOver (self ) and update then
259
+ if sg and isOver (self ) and update then
260
260
sg :SetPercent (sg :GetPercent ()- 0.01 )
261
261
MESSAGEMAN :Broadcast (" UpdateGoals" )
262
262
end
@@ -329,13 +329,13 @@ local function makescoregoal(i)
329
329
Def .Quad {
330
330
InitCommand = cmd (x ,- 16 ;halign ,0 ;zoomto ,16 ,buttonheight ;diffuse ,getMainColor (' positive' );diffusealpha ,buttondiffuse ),
331
331
MouseLeftClickMessageCommand = function (self )
332
- if isOver (self ) and update then
332
+ if sg and isOver (self ) and update then
333
333
sg :SetPriority (sg :GetPriority ()+ 1 )
334
334
MESSAGEMAN :Broadcast (" UpdateGoals" )
335
335
end
336
336
end ,
337
337
MouseRightClickMessageCommand = function (self )
338
- if isOver (self ) and update then
338
+ if sg and isOver (self ) and update then
339
339
sg :SetPriority (sg :GetPriority ()- 1 )
340
340
MESSAGEMAN :Broadcast (" UpdateGoals" )
341
341
end
@@ -344,7 +344,7 @@ local function makescoregoal(i)
344
344
Def .Quad {
345
345
InitCommand = cmd (x ,325 ;halign ,0 ;zoomto ,4 ,4 ;diffuse ,byJudgment (' TapNoteScore_Miss' );diffusealpha ,1 ),
346
346
MouseLeftClickMessageCommand = function (self )
347
- if isOver (self ) and update and sg then
347
+ if sg and isOver (self ) and update and sg then
348
348
sg :Delete ()
349
349
MESSAGEMAN :Broadcast (" UpdateGoals" )
350
350
end
0 commit comments