tag mismatch || number of arguments does not match definition
#1

so i hav this in my script at top

Код:
Float:pHealth,
then the lines gives me errors on are

Код:
        dini_IntSet(file, "Health",PlayerInfo[playerid][pHealth] = 100);
and

Код:
            SetPlayerHealth(playerid, dini_Int(file, "Health")-GetPlayerHealth(playerid));
but i hav these:

pawn Код:
C:\Users\Admin\Desktop\RP\gamemodes\New_RP.pwn(1703) : warning 213: tag mismatch
C:\Users\Admin\Desktop\RP\gamemodes\New_RP.pwn(1738) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
sorry for my bad english
Reply
#2

dini_Int set a INTEGER, which is a NATURAL NUMBER. You should use dini_FloatSet to set FLOATS (numbers with a decimal point), not INTEGERS.
Reply
#3

pawn Код:
dini_IntSet(file, "Health",PlayerInfo[playerid][pHealth] = 100);
This is wrong,as admantis says.
What your trying to do?To save the health or what?
You need to explain a bit xD
Reply
#4

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
pawn Код:
dini_IntSet(file, "Health",PlayerInfo[playerid][pHealth] = 100);
This is wrong,as admantis says.
What your trying to do?To save the health or what?
You need to explain a bit xD
use dini_FloatSet

dini_FloatSet is for floats
dini_IntSet is for integers

You are using a float (health)
Reply
#5

pawn Код:
C:\Users\Admin\Desktop\RP\gamemodes\New_RP.pwn(1738) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
and line is
Код:
SetPlayerHealth(playerid, dini_FloatSet(file, "Health")-GetPlayerHealth(playerid));
thanks for help
Reply
#6

What are you trying to do? I think this is what you're trying to achieve:
pawn Код:
SetPlayerHealth( playerid, dini_GetFloat( file, "Health" ) - GetPlayerHealth( playerid ) );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)