Hi, I have 2 problems in my programm right now. The first one is, that I got a variable "health" in my script_2, but I cant get access to "health" when I'm in script_1. The programm thinks that health is equal to 0, even when I include script_2.
Code:
script_2.c:
var health = 100;

script_1.c:
#include "script_2.c"
PANEL* health_pan =
	{
	layer = 15;
	digits (100, 200, "Life: %.f", arial_font, 1, health);
	}


The second problem is, that I don't know how to save a variable into a string. I want to change the value of the string speed_str = "10" into the value of the variable "speed"
Code:
STRING* speed_str = "10";

speed += 10; <--- At this moment, I want that speed_str is equal "20";

TEXT* speed_txt =
{
	pos_x = 100;
	pos_y = 200;
	string (speed_str);
}

I tried speed_str = "speed" <--- Of course that won't work...



Last edited by h34dl4g; 06/01/10 14:51.

1338, beyond leet.