22.04.2012, 14:35
having some issues with "raven roleplay"
since there are TONS of lines with these errors. i just give you guys a few. they are all the same error but idk how to fix it lol
Thanks in advance! :P
since there are TONS of lines with these errors. i just give you guys a few. they are all the same error but idk how to fix it lol
Код:
C:\Documents and Settings\Administrator\Desktop\xd\gamemodes\larp.pwn(26588) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\xd\gamemodes\larp.pwn(26648) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\xd\gamemodes\larp.pwn(26701) : error 047: array sizes do not match, or destination array is too small
pawn Код:
dcmd(xgoto, 5, cmdtext);
dcmd(gpsfind, 7, cmdtext);
dcmd(attach,6,cmdtext);
dcmd(unattach,8,cmdtext);
dcmd(acheckcode,10,cmdtext);
dcmd(alias,5,cmdtext);
dcmd(ips,3,cmdtext);
dcmd(getips,6,cmdtext);
dcmd(getaliases,10,cmdtext);
dcmd(unban,5,cmdtext);
//dcmd(saveeverything,14,cmdtext);
new string[512 char];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[128];
new tmp[128];
new dancestyle;
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
cmd = strtok(cmdtext, idx); // <<---- error line 26588
GetPlayerName(playerid, sendername, sizeof(sendername));
new y5, m5, d5;
new h5,mi5,s5;
getdate(y5,m5,d5);
gettime(h5,mi5,s5);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> %s",d5,m5,y5,h5,mi5,s5,sendername,cmdtext);
AllCommandLog(string);
pawn Код:
if (strcmp(cmd, "/breathtest", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsACop(playerid))
{
tmp = strtok(cmdtext, idx); //<------- error line 26648
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /breathtest [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
new level = GetPlayerDrunkLevel(giveplayerid);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 3)
{
if(level > 600)
{
format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Intoxicated **");
GameTextForPlayer(playerid,"~w~This player is~n~~r~Drunk", 8000, 1);
return 1;
}
else
{
format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Not Intoxicated **");
GameTextForPlayer(playerid,"~w~This player is~n~~r~Not Drunk", 8000, 1);
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " This player is offline !");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use this command! (Cops Only)");
}
}
return 1;
}
pawn Код:
if (strcmp(cmd, "/drugtest", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsACop(playerid))
{
tmp = strtok(cmdtext, idx); //<----- error line 26701
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /drugtest [playerid/PartOfName]");
return 1;
}
Thanks in advance! :P