• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GM wont let me do this

Megax60

Member
i did a dialogue system, it works with message[0] = bla, message[1] = bla bla etc...

so i did this
Code:
message[0] = "You ate a " + food + "
" + m + "
" + global.heal + "remaining"
food its a random food, m its a comment based on the chosed food, global.heal is the remaining foods, but it wont let me use the global var, it crashes
 

JackTurbo

Member
Is it because your trying store multiple types in a single array entry?

Does it work if you change all the variables to strings?
Code:
message[0] = "You ate a " +string( food) + "
" + string(m) + "
" + string(global.heal) + "remaining"
Obviously that means the array entry wont update if those variables change afterwards however
 

Megax60

Member
Is it because your trying store multiple types in a single array entry?

Does it work if you change all the variables to strings?
Code:
message[0] = "You ate a " +string( food) + "
" + string(m) + "
" + string(global.heal) + "remaining"
Obviously that means the array entry wont update if those variables change afterwards however
it does, thanks
 
Top