1 error
#1

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);
  }
Reply
#2

pawn Код:
if (strcmp("/heal", cmdtext, true) == 0)
    {
    SetPlayerHealth(playerid, 100.0);
    return 1;
    }
Reply
#3

pawn Код:
if(strcmp(cmdtext, "/heal", true))
  {
    SetPlayerHealth(playerid, 100.0);
  }
You forgot ) in this line:
if(strcmp(cmdtext, "/heal", true))
Reply
#4

oops a sec late..
Reply
#5

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
Reply
#6

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.
Reply
#7

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;
  }
Reply
#8

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;
}
Reply
#9

yeah i use them too all same
Reply
#10

But you get errors, & I don't.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)