SA-MP Forums Archive
Buying Hotdog (SetPlayerHealth) Warnings - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Buying Hotdog (SetPlayerHealth) Warnings (/showthread.php?tid=626868)



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(playeridhealth)
                if(
health >70)
                {
                    
SetPlayerHealth(playerid100);
                }
                
ac_GivePlayerMoney(playerid, -100);
                
SendClientMessage(playeridHBLAU"Du hast dir von Phillip fьr 100$ ein Hotdog gekauft.");
                
SetPlayerHealth(playeridGetPlayerHealth(playerid)+30);
            }
            else
            {
                
SendClientMessage(playeridGRAU"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(playeridhealth)
                if(
health >70)
                {
                    
SetPlayerHealth(playerid100);
                }
                
ac_GivePlayerMoney(playerid, -100);
                
SendClientMessage(playeridHBLAU"Du hast dir von Phillip fьr 100$ ein Hotdog gekauft.");
                
SetPlayerHealth(playeridGetPlayerHealth(playerid)+30);
            }
            else
            {
                
SendClientMessage(playeridGRAU"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 код:
RankSA-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.