Help Please :)
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/test", cmdtext, true, 10) == 0)
	{
        GetPlayerHealth(playerid 100)
        SetPlayerArmour(playerid 100)
		return 1;
	}
	return 0;
}
When i do this on a normal start it gives warning:

Код:
(93) : error 001: expected token: ",", but found "-integer value-"
(93) : warning 215: expression has no effect
(93) : error 001: expected token: ";", but found ")"
(93) : error 029: invalid expression, assumed zero
(93) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
İm new to this i just started today and im trying to do my best to become filterscripter
Reply
#2

This:

GetPlayerHealth(playerid 100)
SetPlayerArmour(playerid 100)

Should be:

SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
Reply
#3

https://sampwiki.blast.hk/wiki/GetPlayerHealth
https://sampwiki.blast.hk/wiki/SetPlayerArmour
https://sampforum.blast.hk/showthread.php?tid=199796
Reply
#4

Filterscripter? Maybe you meant scripter.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/test", cmdtext, true, 10) == 0)
    {
        GetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        return 1;
    }
    return 0;
}
You were missing some commas and the ;.
I added them for you, it should compile just fine now.
Reply
#5

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
Filterscripter? Maybe you meant scripter.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    [I][B][SIZE="4"]if (strcmp("/test", cmdtext, true, 5) == 0)[/SIZE][/B][/I]//And it 5 "/test"
    {
        [B][U][SIZE="4"]GetPlayerHealth(playerid, 100);[/SIZE][/U][/B]//Wtf is this??
        SetPlayerArmour(playerid, 100);
        return 1;
    }
    return 0;
}
You were missing some commas and the ;.
I added them for you, it should compile just fine now.
It's should be "Set".
Reply
#6

Thanks all i will try it and i hope it will work.

And im new around here so dont know the terms etc.
Reply
#7

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
Filterscripter? Maybe you meant scripter.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/test", cmdtext, true, 10) == 0)
    {
        GetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        return 1;
    }
    return 0;
}
You were missing some commas and the ;.
I added them for you, it should compile just fine now.
Get should also be Set...

Unless you were trying to do,

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/test", cmdtext, true, 10) == 0)
	{
        new Float: PHp;
        GetPlayerHealth(playerid, PHp);
        SetPlayerArmour(playerid, PHp);
		return 1;
	}
	return 0;
}
Reply
#8

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
It's should be "Set".
Oh, indeed.
Sorry, my fault, didn't see that.
Reply
#9

Quote:
Originally Posted by lordturhan
Посмотреть сообщение
Thanks all i will try it and i hope it will work.

And im new around here so dont know the terms etc.
Read them and you shouldn't lost.
Reply
#10

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Read them and you shouldn't lost.
İ did but still i couldnt do it

İ will try to add this code to lvdm.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)