22.03.2015, 10:23
When I compile it freezes for a few seconds and then it shows this
|
What were you doing before trying to compile it?
There might be something wrong with that script. |
forward createMBag(x, y, z, position[]);
public createMBag();
forward createMBag(Float:x, Float:y, Float:z, position[]);
public createMBag(Float:x, Float:y, Float:z, position[])
|
pawn Код:
pawn Код:
Second, you need to use floats for coordinates, or numbers that has decimals, and as well i removed the semicolon. EDIT: Same with the MoneyBag public you created, remove the semicolon, only the forward needs it. |
new mBag = 0;
new mBagLoc[50] = "Nowhere";
new mBagPickup;
public OnGameModeInit()
{
Moneybag();
return 1;
}
forward Moneybag();
public Moneybag()
{
new
pos = random(42)
;
if (pos <= 5)
{
switch (pos)
{
case 0: createMBag(265.6487,2561.8484,16.3672, "Abandoned Airport");
case 1: createMBag(185.7434,2548.7910,16.5096, "Abandoned Airport");
}
}
return 1;
}
forward createMBag(x, y, z, position[]);
public createMBag(x, y, z, position[])
{
new string[128];
mBagPickup = CreatePickup(1550, 2, x, y, z, 0);
strmid(mBagLoc, position, 0, strlen(position), sizeof (position));
format(string, sizeof(string), "{3B7A57}[{A4C639}MoneyBag{3B7A57}] {568203}The moneybag has been hidden at {87A96B}%s{568203}! Find it for a reward.", mBagLoc);
return 1;
}
|
Many problems:
Код:
new mBag = 0;
new mBagLoc[50] = "Nowhere";
new mBagPickup;
public OnGameModeInit()
{
Moneybag();
return 1;
}
forward Moneybag();
public Moneybag()
{
new
pos = random(42)
;
if (pos <= 5)
{
switch (pos)
{
case 0: createMBag(265.6487,2561.8484,16.3672, "Abandoned Airport");
case 1: createMBag(185.7434,2548.7910,16.5096, "Abandoned Airport");
}
}
return 1;
}
forward createMBag(x, y, z, position[]);
public createMBag(x, y, z, position[])
{
new string[128];
mBagPickup = CreatePickup(1550, 2, x, y, z, 0);
strmid(mBagLoc, position, 0, strlen(position), sizeof (position));
format(string, sizeof(string), "{3B7A57}[{A4C639}MoneyBag{3B7A57}] {568203}The moneybag has been hidden at {87A96B}%s{568203}! Find it for a reward.", mBagLoc);
return 1;
}
|