• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

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