The fuck is wrong with this class?
Hi.
So I've written classes before, but never ran into something like this. For some reason it seems to be setting all of my propertys to blank when I make an instance of it, either that or I'm being increddibly stupid. Anyways, here is the actuall class part of the script, let me know what I've fucked up.
class enemy
{
int x, y, z;
string map;
int type=random(1,3);
int health=random(1500,3000);
int target;
timer movetimer;
int movetime=200;
timer firetimer;
int firetime=750;
string loop;
string hitby="no one";
int id=random(1,99);
enemy(int bx,int by,int bz,string bmap,int bmovetime,int bfiretime,int bhealth,string bhitby,int bid,int btype)
{
x=bx;
y=by;
z=bz;
map=bmap;
target=select_random_player();
health=bhealth;
loop=spawn_moving_sound("ai"+type+"taunt"+random(1,3)+".ogg",x,y,z,map);
movetime=bmovetime;
firetime=bfiretime;
hitby=bhitby;
id=bid;
type=btype;
}
}
For refference, here is the error it produces.
Error: No matching signatures to 'enemy(int, int, int, string&)'
Information: enemy@ enemy(int bx, int by, int bz, string bmap, int bmovetime, int bfiretime, int bhealth, string bhitby, int bid, int btype)
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector