Buying Hotdog (SetPlayerHealth) Warnings
#1

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

Seriously, use the goddamn wiki: https://sampwiki.blast.hk/wiki/GetPlayerHealth

That error is self explanantory.
Reply
#3

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.");
            }
        } 
Reply
#4

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

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

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

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



wtffff ??
Reply
#9

Quote:
Originally Posted by Yaa
Посмотреть сообщение
wtffff ??
I am not an expert. but I can tell you. That isn't Russian.

Reply
#10

Quote:
Originally Posted by Codeah
Посмотреть сообщение
I am not an expert. but I can tell you. That isn't Russian.

indeed.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)