1 error -
Domenic_Montery - 15.06.2009
C:\Users\Semir\Desktop\samp02Xserver.win32\gamemod es\ModernLife.pwn(299) : error 001: expected token: ")", but found "{"
what should i do.this is the script
Код:
if(strcmp(cmdtext, "/heal", true)
{
SetPlayerHealth(playerid, 100.0);
}
Re: 1 error -
Abernethy - 15.06.2009
pawn Код:
if (strcmp("/heal", cmdtext, true) == 0)
{
SetPlayerHealth(playerid, 100.0);
return 1;
}
Re: 1 error -
AiVAMAN - 15.06.2009
pawn Код:
if(strcmp(cmdtext, "/heal", true))
{
SetPlayerHealth(playerid, 100.0);
}
You forgot ) in this line:
if(strcmp(cmdtext, "/heal", true)
)
Re: 1 error -
AiVAMAN - 15.06.2009
oops a sec late..
Re: 1 error -
Domenic_Montery - 15.06.2009
yea cool i forgot ")" this shit hahah
thanks guys
btw can i add a line under setplayerheathl
SendClientMessage(playerid, COLOR_GREEN, "You have been Healed.");
cause i get for errors
C:\Users\Semir\Desktop\samp02Xserver.win32\gamemod es\ModernLife.pwn(301) : error 001: expected token: ";", but found ")"
C:\Users\Semir\Desktop\samp02Xserver.win32\gamemod es\ModernLife.pwn(301) : error 029: invalid expression, assumed zero
C:\Users\Semir\Desktop\samp02Xserver.win32\gamemod es\ModernLife.pwn(301) : fatal error 107: too many error messages on one line
Re: 1 error -
Abernethy - 15.06.2009
Well. That code is perfectly fine, it must be further in your script. If you don't mind posting it, please do. We will be able to help a lot more.
Re: 1 error -
Domenic_Montery - 15.06.2009
i used in onplayercommandtext
this is my heal script
Код:
if(strcmp(cmdtext, "/heal", true))
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, COLOR_GREEN, "You have been Healed.");
return 1;
}
Re: 1 error -
Abernethy - 15.06.2009
I don't know how you use commands, but I use them this way.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/heal", cmdtext, true) == 0)
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, COLOR_GREEN, " You've been healed.");
return 1;
}
return 0;
}
Re: 1 error -
Domenic_Montery - 15.06.2009
yeah i use them too all same
Re: 1 error -
Abernethy - 15.06.2009
But you get errors, & I don't.