there shouldn't be problem while there is Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: there shouldn't be problem while there is Help (
/showthread.php?tid=236809)
there shouldn't be problem while there is Help -
Roomeo - 08.03.2011
Errors..
pawn Код:
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(225) : error 010: invalid function or declaration
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(229) : error 010: invalid function or declaration
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(232) : error 010: invalid function or declaration
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(237) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors
script
pawn Код:
if (strcmp("/Kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_BRIGHTRED, "You Killed Yourself!");
return 1;
}
if(strcmp(cmdtext, "/rules", true, 6)== 0)
{
SendClientMessage(playerid, 0xFF0000AA," Rules");
return 1;
}
Re: there shouldn't be problem while there is Help -
Sascha - 08.03.2011
pawn Код:
if (strcmp("/Kill", cmdtext, true, 6) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_BRIGHTRED, "You Killed Yourself!");
return 1;
}
if(strcmp( "/rules", cmdtext, true, 6)== 0)
{
SendClientMessage(playerid, 0xFF0000AA," Rules");
return 1;
}
don't know if that fixed anything, tell use which line in the script are the one's of the errors..
Re: there shouldn't be problem while there is Help -
Davz*|*Criss - 08.03.2011
Quote:
Originally Posted by Roomeo
Errors..
pawn Код:
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(225) : error 010: invalid function or declaration I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(229) : error 010: invalid function or declaration I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(232) : error 010: invalid function or declaration I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(237) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors
script
pawn Код:
if (strcmp("/Kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid, 0); SendClientMessage(playerid, COLOR_BRIGHTRED, "You Killed Yourself!"); return 1; }
if(strcmp(cmdtext, "/rules", true, 6)== 0) { SendClientMessage(playerid, 0xFF0000AA," Rules"); return 1; }
|
pawn Код:
if (strcmp("Kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA, "You have killed yourself!");
return 1;
}
if (strcmp("Rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "Rules!");
return 1;
}
Or
Код:
if (strcmp("Kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA, "You have killed yourself!");
return 1;
}
if (strcmp("Rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "Rules!");
return 1;
}
Re: there shouldn't be problem while there is Help -
Roomeo - 08.03.2011
Fixed
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA, "You have killed yourself!");
return 1;
}
if (strcmp("/Rules", cmdtext, true, 6) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "Rules!");
return 1;
}
return 0;
}
Re: there shouldn't be problem while there is Help -
Davz*|*Criss - 08.03.2011
Good, we are always here to help.
Re: there shouldn't be problem while there is Help -
Roomeo - 08.03.2011
xD i think the problem was return 0; in last i didn't added that then later i added it :P