Buying Hotdog (SetPlayerHealth) Warnings -
aw1337 - 21.01.2017
Hey,
how can i fix this? When he repsonses the playerid should get +30. But if his HP is over 70, only set to 100, and not over it. I get these warnings :
Код:
C:\Users\Safa B\Desktop\Server\gamemodes\gamemode.pwn(19784) : warning 202: number of arguments does not match definition
C:\Users\Safa B\Desktop\Server\gamemodes\gamemode.pwn(19790) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664
Код:
case DIALOG_HOTDOG:
{
if(response)
{
if(GetPlayerHealth(playerid)>70)
{
SetPlayerHealth(playerid, 100);
}
ac_GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, HBLAU, "Du hast dir von Phillip fьr 100$ ein Hotdog gekauft.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)+30);
}
else
{
SendClientMessage(playerid, GRAU, "Du hast dir kein Hotdog gekauft.");
}
}
The warnings are on line where i use "if(GetPlayerHealth(playerid)>70) and on SetPlayerHealth.
Re: Buying Hotdog (SetPlayerHealth) Warnings -
BiosMarcel - 21.01.2017
Seriously, use the goddamn wiki:
https://sampwiki.blast.hk/wiki/GetPlayerHealth
That error is self explanantory.
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Yaa - 21.01.2017
PHP код:
case DIALOG_HOTDOG:
{
if(response)
{
new Float:health;
GetPlayerHealth(playerid, health)
if(health >70)
{
SetPlayerHealth(playerid, 100);
}
ac_GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, HBLAU, "Du hast dir von Phillip fьr 100$ ein Hotdog gekauft.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)+30);
}
else
{
SendClientMessage(playerid, GRAU, "Du hast dir kein Hotdog gekauft.");
}
}
Re: Buying Hotdog (SetPlayerHealth) Warnings -
ISmokezU - 21.01.2017
Quote:
Originally Posted by Yaa
PHP код:
case DIALOG_HOTDOG:
{
if(response)
{
new Float:health;
GetPlayerHealth(playerid, health)
if(health >70)
{
SetPlayerHealth(playerid, 100);
}
ac_GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, HBLAU, "Du hast dir von Phillip fьr 100$ ein Hotdog gekauft.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)+30);
}
else
{
SendClientMessage(playerid, GRAU, "Du hast dir kein Hotdog gekauft.");
}
}
|
There's a valid reason why marcel didn't just fix the code for him. you just go against his point.
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Yaa - 21.01.2017
Quote:
Originally Posted by ISmokezU
There's a valid reason why marcel didn't just fix the code for him. you just go against his point.
|
lemme explaint:
newbie see this post => goto wiki => didn't undestand => come back here and start beg for help => no one helped him => bump before 1 day => got banned
#True_Story
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Codeah - 21.01.2017
Quote:
Originally Posted by Yaa
lemme explaint:
newbie see this post => goto wiki => didn't undestand => come back here and start beg for help => no one helped him => bump before 1 day => got banned
#True_Story
|
This guy knows what he's talking about! He's a Lead SA-MP Scripter.
#True_Story
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Yaa - 21.01.2017
Quote:
Originally Posted by Codeah
This guy knows what he's talking about! He's a Lead SA-MP Scripter.
#True_Story
|
PHP код:
Rank: SA-MP Scripter
take you glass or go buy one
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Yaa - 21.01.2017
wtffff ??
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Codeah - 21.01.2017
Quote:
Originally Posted by Yaa
wtffff ??
|
I am not an expert. but I can tell you. That isn't Russian.
Re: Buying Hotdog (SetPlayerHealth) Warnings -
Yaa - 21.01.2017
Quote:
Originally Posted by Codeah
I am not an expert. but I can tell you. That isn't Russian.
|
indeed.