Help with a single command
#1

Hello everybody, i got a problem.

I get this error:
Код:
C:\Users\Бdi\Documents\SA-MP\pawno\new2.pwn(22) : error 017: undefined symbol "givePlayerMoney"
C:\Users\Бdi\Documents\SA-MP\pawno\new2.pwn(23) : error 017: undefined symbol "setPlayerHealth"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
When trying to compile this script:
Код:
#include <a_samp>
#include <a_players>

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by Stryp");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
/* Mit tegyьnk, amikor a jбtйkos parancsot нr be */
{
	if (strcmp("/healme", cmdtext, true, 7) == 0) // Ha a parancsa /healme
	{
	givePlayerMoney(playerid,-200); // Adunk neki -200 dollбrt, azaz elveszьnk
	setPlayerHealth(playerid,100); // Viszont kap йletet, teletцltjьk
	return 1;
	/* Ne legyen SERVER: Unknown Command. kiнrбs, mivel sikeresen vйgrehajtottuk
	a parancsot, semmi hiba nem tцrtйnt. */
	}
	
	return 0;
/* Ha nincs ilyen parancs, нrja ki: SERVER: Unknown Command. */
}
EDIT: Comments are in hungarian
Reply
#2

It's GivePlayerMoney and SetPlayerHealth.
Reply
#3

oh true, just wrote it in lua-style thanks
Reply
#4

u should remember then u need to put the first letter as a BIG letter
for eximple:

wrong!
Код:
public onPlayerConnect(somthing)
{
sendClientmessage(playerid, 0xFFFFFF, "You have connected to our server");
return 1;
}
good!
Код:
public onPlayerConnect(somthing)
{
SendClientMessage(playerid, 0xFFFFFF, "You have connected to our server");
return 1;
}
i hope u know what i talking about =D
Reply
#5

yes, i got it, lua-style is like this:

(example command, but works)

setTimer(function()setElementHealth(root,1000) end, 1000,30)

it sets a timer for 1 second which runs for 30 times, and sets everything's health to 1000 (vehicles, robots, players).

in lua, you need to write the first as a small one.
setTimer
setElementHealth
setElementPosition
outputChatBox (same as SendClientMessage in samp)

um, this was MTA.
Reply
#6

nope the first should be BIG

SetTimer
SetElementHealth
SetElementPosition
OutputChatBox (i dont thing it even exist,mybe if u have an .inc for thet...)
Reply
#7

i wrote:
Quote:

um, this was MTA.

MTA = Multi Theft Auto, another multiplayer mode, with another scripting system and language. In pawn it should be big, in Lua it should be small
Reply
#8

ya ik what is this....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)