21.10.2014, 10:21
i've been trying to run Raven's script (RP) and it was fully with errors about 43 errors in total , i fixed many of them but still for me 3 im very tierd now ineed your help guys
PHP код:
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\larp.pwn(25115) : error 021: symbol already defined: "strtok"
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\larp.pwn(25130) : error 047: array sizes do not match, or destination array is too small
C:\Users\ZOFTer\Desktop\0.3Z server\gamemodes\larp.pwn(68237) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
PHP код:
strtok(const string[], &index)
{ //======================25115=======================
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
PHP код:
trtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result; // ============================25130========================
}
PHP код:
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
x_weapon = strtok(cmdtext, idx); //=========================68237=====================
if(!strlen(x_weapon))
{
if(PlayerInfo[playerid][pRegularRank] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /creategun [playerid/PartOfName] [weaponname]");
SendClientMessage(playerid, COLOR_GREY, "Weapons: knife(50) bat(25) flowers(25) silenced(100) deagle (225) Molotovs (800)");
SendClientMessage(playerid, COLOR_GREY, "Weapons: mp5(350) combat (600) shotgun(200) ak47(500) m4(650) country (450)");
SendClientMessage(playerid, COLOR_GREY, "Weapons: TEC9(200) MAC10 (275) Sniper(800) Colt45(125) sawnoff(300) RPG (1000)");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /creategun [playerid/PartOfName] [weaponname]");
SendClientMessage(playerid, COLOR_GREY, "Weapons: knife(50) bat(25) flowers(25) silenced(100) deagle (225) Molotovs (800)");
SendClientMessage(playerid, COLOR_GREY, "Weapons: mp5(350) combat (600) shotgun(200) ak47(500) m4(650) country (450)");
SendClientMessage(playerid, COLOR_GREY, "Weapons: TEC9(200) MAC10 (275) Sniper(800) Colt45(125) sawnoff(300) RPG (1000)");
return 1;
}
}
}