coding help plz!

Posted by V on Aug. 2, 2006, 2:46 a.m.

<h1>this problem was solver by shadowstrike32! thanks dude! </h1>

i'm currently working on the prequal to 64quest, 64quest- attack of the GMC (just named it) and i'm trying to get a special little system in where like in super mario world, it will tally up the remaining time and add it to your points. i have this all done already, except there's this one problem that i seem to have, when i try to draw the text showing the results, I.E. how much time was remaining, how many points were added into the score and such, as well as a helth bonus multiplier. (it multiplies the score tallied up from the remaining time and adds itself to the score)

anyways, the problem here is that i can't find a way to draw the results out, i know this is possible with a string (i think) but i have absolutly no experience with strings, so could somebody please help me out? here is the code, it's down below with the variables labeled and everything, don't worry about the draw event, i already have that finished up.

//variables
//time= time that was remaining
//pointsadd= points tallied up from the remaining time
//I.E. time(50)*50=pointsadd(2500)
//pointstotal= total points that are added to the score
//I.E. health bonus(4 (max health))*pointsadd=pointstotal

this is the drawing part. i have no idea how to do this as a string, so someone please help me to where i should say 

"statistics
time*50=pointsadd
health*pointsadd=pointstotal"

string('statistics#'time'*50='pointsadd'#hp multiplier='health'*'pointsadd'='pointstotal'#total='pointstotal)

yeah, sort of a confusing situation for me. if someone could, can someone also help me do the overworld graphics for the different worlds? i stink at spriting those sorts of things, so i also need someone to help me make tiles for the overworld.

that, and i would also like to have a reference that could help me with something that i can't solve if i encounter a coding problem within the game. meaning if someone could be a code specialist during the creation of the game, i would really really appreciate it, and if anyone helps me while making this, they'll get a very nice spot in the credits! =D so plz help me out!

Comments

Adventus 18 years, 6 months ago

are you talking about the draw_text() function? because i think you've got everything else right, although that string looks really ugly.

V 18 years, 6 months ago

yeah. i was hping someone would be able to understand it and find a way to fix it. -_-;;

and no, i'm not using the draw_text() function, i'm using the dialogue box that i am using in 64quest. i'll try and mess around with the draw_text() function though and see if it works.

shadowstrike32 18 years, 6 months ago

string_variable = string(x, y, 'statistics#' + time+ '*50=' + pointsadd + '#hp multiplier=' + health + '*' + pointsadd + '=' + pointstotal + '#total=' +pointstotal);

draw_text(x, y, string_variable);

message(string_variable);

V 18 years, 6 months ago

hmm. now this pops up.

string_variable=string('statistics#'+ time + '*50=' + pointsadd + '#hp multiplier=' +health + '*' + pointsadd + '=' pointstotal + '#total=' + pointstotal);

at position 43: wrong type of arguments to +.

*confused*

shadowstrike32 18 years, 6 months ago

put the string() function around integer values.

like…

string(health)

V 18 years, 6 months ago

k, lemme do that right fast..

V 18 years, 6 months ago

awesome. it's working now! thanks!

shadowstrike32 18 years, 6 months ago

no problem.