10.02.2013, 10:20
So I've made a /shop dialog, and I made the option that players can buy +25 health, +50 health... so I made this, but it gives me warnings.
Warnings:
EDIT: forgot to say what is causing the warnings lol, these lines are causing it:
Anybody knows how to fix this?
pawn Code:
case 5:
{
if(!response) return 0;
if(response)
{
if(listitem == 0)
{
new Float:health = GetPlayerHealth(playerid) + 25;
SetPlayerHealth(playerid, health);
GivePlayerMoney(playerid, -500);
}
if(listitem == 1)
{
new Float:health = GetPlayerHealth(playerid) + 50;
SetPlayerHealth(playerid, health);
GivePlayerMoney(playerid, -1000);
}
if(listitem == 2)
{
new Float:health = GetPlayerHealth(playerid) + 75;
SetPlayerHealth(playerid, health);
GivePlayerMoney(playerid, -1500);
}
if(listitem == 3)
{
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -2000);
}
}
}
Code:
C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\Unfinished2.pwn(777) : warning 202: number of arguments does not match definition C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\Unfinished2.pwn(783) : warning 202: number of arguments does not match definition C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\Unfinished2.pwn(789) : warning 202: number of arguments does not match definition
pawn Code:
new Float:health = GetPlayerHealth(playerid) + 25;
new Float:health = GetPlayerHealth(playerid) + 50;
new Float:health = GetPlayerHealth(playerid) + 75;