Coding

 Reply to this postStart new topic

Game Crashed -Help-

Michael.Knight1
post Sep 19 2012, 08:17 AM
Post #1


Member

Posts: 130
From: Germany
Joined: 24-March 12



this is my health hud script , why game crashed if actor die ?? yucky.gif
CODE
Code Deleted


This post has been edited by Michael.Knight1: Sep 19 2012, 06:09 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 19 2012, 02:05 PM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



It's not really crashing, it's just doing only this:
CODE
:NONAME_622
if
  1@ >= 10
jf @NONAME_622


Forever, cause when you die, 1@ is 0 and there's no break in the code to let the rest of the game do what it needs to do.


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 19 2012, 05:28 PM
Post #3


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 19 2012, 03:05 PM) *
It's not really crashing, it's just doing only this:
CODE
:NONAME_622
if
  1@ >= 10
jf @NONAME_622


Forever, cause when you die, 1@ is 0 and there's no break in the code to let the rest of the game do what it needs to do.

Thanks you it work no so very fine , just change 10 by 0 .. wub.gif wub.gif
deji you're the best thumbsup.gif

EDIT : deji can you help me more about my resident evil hud script ..
just about showing money value , Original Was like This $0025687 :

but when i use :
CODE
$MOENY_HUD = Player.Money($PLAYER_CHAR)
0340: set_text_draw_RGBA 24 173 34 255
033F: set_text_draw_letter_size 0.5 1.8
0349: set_text_draw_font 2
033E: set_draw_text_position 30.0 220.0 GXT '_HUD3'
0340: set_text_draw_RGBA 250 45 69 255
033F: set_text_draw_letter_size 0.5 1.8
0349: set_text_draw_font 2
045A: draw_text_1number 140.0 220.0 GXT 'NUMBER' number $MOENY_HUD  // ~1~

I Find $25876 without the Zeros ! why ??


This post has been edited by Michael.Knight1: Sep 19 2012, 05:56 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 19 2012, 07:13 PM
Post #4


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Stop using named global variables.

Try this:
010B: store_score $PLAYER_CHAR to 0@
0AD3: string_format 1@v format "$%08d" 0@   // %08d - 8 char decimal with leading 0's
0ADF: add_text_label "_DDDOLL" text 1@v
033E: display_text 320.0 180.333 gxt "_DDDOLL


1@-2@ will be consumed by the string.


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 19 2012, 07:25 PM
Post #5


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 19 2012, 08:13 PM) *
Stop using named global variables.

Try this:
010B: store_score $PLAYER_CHAR to 0@
0AD3: string_format 1@v format "$%08d" 0@   // %08d - 8 char decimal with leading 0's
0ADF: add_text_label "_DDDOLL" text 1@v
033E: display_text 320.0 180.333 gxt "_DDDOLL


1@-2@ will be consumed by the string.

thanks biggrin.gif

Deji do you have any solution to not show any texture while fade loaded ??


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 19 2012, 07:28 PM
Post #6


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



03E3: set_sprites_draw_before_fade 1

Before every draw.


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 19 2012, 08:11 PM
Post #7


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 19 2012, 08:28 PM) *
03E3: set_sprites_draw_before_fade 1

Before every draw.

That Who I Need , Thanks you a lot wub.gif

Finished by 65 % rolleyes.gif


Deji i want the ammo string format Many Cartridges but while i use ( %d ) i just show one Cartridges .
CODE
0AD3: string_format 5@v format "Ammo%d" 4@


This post has been edited by Michael.Knight1: Sep 19 2012, 10:04 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 19 2012, 09:04 PM
Post #8


Member

Posts: 130
From: Germany
Joined: 24-March 12



Deji the money text won't work with string format ! Why .. ? mellow.gif

CODE
1@ = Player.Money($PLAYER_CHAR)
0AD3: string_format 1@v format "$%08d" 1@   // %08d - 8 char decimal with leading 0's
0340: set_text_draw_RGBA 223 223 223 223
033F: set_text_draw_letter_size 0.7 2.0
0349: set_text_draw_font 3
0ADF: add_text_label "_DDDOLL" text 1@v
033E: display_text 320.0 180.333 gxt "_DDDOLL"


This post has been edited by Michael.Knight1: Sep 19 2012, 09:05 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 19 2012, 09:23 PM
Post #9


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



1@ = Player.Money($PLAYER_CHAR)  // stop using classes!
0AD3: string_format 1@v format "$%08d" 1@   // %08d - 8 char decimal with leading 0's


Because you set the output to 1@v, when the cash is stored there. It usually doesn't matter with SCM, but this command uses sprintf, which changes the output while processing.


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 19 2012, 09:28 PM
Post #10


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 19 2012, 09:23 PM) *
1@ = Player.Money($PLAYER_CHAR)  // stop using classes!
0AD3: string_format 1@v format "$%08d" 1@   // %08d - 8 char decimal with leading 0's


Because you set the output to 1@v, when the cash is stored there. It usually doesn't matter with SCM, but this command uses sprintf, which changes the output while processing.

But game still crashed ??
CODE
1@v = Player.Money($PLAYER_CHAR)
0AD3: string 1@v "$%08D" 1@
0340: set_text_draw_RGBA 223 223 223 223
033F: set_text_draw_letter_size 0.7 2.0
0349: set_text_draw_font 3
0ADF: add_dynamic_GXT_entry "_DDDOLL" text 1@
033E: set_draw_text_position 320.0 180.333 GXT "_DDDOLL"


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 19 2012, 10:17 PM
Post #11


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



1@v = Player.Money($PLAYER_CHAR)

Stop using classes! And since when do you store an integer to a @v variable?

0AD3: string 1@v "$%08D" 1@

What I originally said was you can't use 1@ both as the output and a parameter.

0340: set_text_draw_RGBA 223 223 223 223
033F: set_text_draw_letter_size 0.7 2.0
0349: set_text_draw_font 3
0ADF: add_dynamic_GXT_entry "_DDDOLL" text 1@

You can't use an integer as a string. Well, with this command you can, but it expects a pointer. Use a string variable.


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 19 2012, 10:40 PM
Post #12


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 19 2012, 11:17 PM) *
1@v = Player.Money($PLAYER_CHAR)

Stop using classes! And since when do you store an integer to a @v variable?

0AD3: string 1@v "$%08D" 1@

What I originally said was you can't use 1@ both as the output and a parameter.

0340: set_text_draw_RGBA 223 223 223 223
033F: set_text_draw_letter_size 0.7 2.0
0349: set_text_draw_font 3
0ADF: add_dynamic_GXT_entry "_DDDOLL" text 1@

You can't use an integer as a string. Well, with this command you can, but it expects a pointer. Use a string variable.

ok i'll but can you write me the true codes for money values like that if you can because i don't know why i'll show all time Airport Internation ?? no problem but just write me the true codes and thanks in advanced thumbsup.gif


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
badboy
post Sep 20 2012, 02:32 PM
Post #13


Trained Member

Posts: 76
From: Nederland, NL
Joined: 1-May 12



QUOTE (Michael.Knight1 @ Sep 19 2012, 07:28 PM) *
deji can you...


QUOTE (Michael.Knight1 @ Sep 19 2012, 09:25 PM) *
Deji do you...


QUOTE (Michael.Knight1 @ Sep 19 2012, 10:11 PM) *
Deji i want...


QUOTE (Michael.Knight1 @ Sep 20 2012, 12:40 AM) *
just write me...


There's a request topic for this.

This post has been edited by badboy: Sep 20 2012, 02:35 PM
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 20 2012, 04:42 PM
Post #14


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (badboy @ Sep 20 2012, 03:32 PM) *
There's a request topic for this.

Sorry , you know my english is bad but i not request just now i need one help for showing the money value like original one in san andreas


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 20 2012, 05:17 PM
Post #15


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Yeah, I'm not writing it for you. I've explained the problem well enough, if you're unable to make anything out of it, you need to touch up on your coding knowledge.


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 20 2012, 06:33 PM
Post #16


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 20 2012, 05:17 PM) *
Yeah, I'm not writing it for you. I've explained the problem well enough, if you're unable to make anything out of it, you need to touch up on your coding knowledge.

so i know the text string but my problem is need to show the money value like original , so anyways no problem thumbsup.gif

Now if you have any solution to not show any text if fade loaded as texture ?? nuke.gif

This post has been edited by Michael.Knight1: Sep 20 2012, 06:50 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 20 2012, 07:00 PM
Post #17


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



CODE
03E0: set_text_draw_before_fade 1


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 20 2012, 07:07 PM
Post #18


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Deji @ Sep 20 2012, 07:00 PM) *
CODE
03E0: set_text_draw_before_fade 1

thanks you a gain


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: