Little HELP please, +rep!!
#1

Code:
PHP код:
forward necuupdate();
public 
necuupdate()
{
        foreach(
Playerplayerid)
        {
        if(
UlogovanProvera[playerid] == 1)
        {
        if(
IsPlayerInAnyVehicle(playerid))
        {
        if(!
VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
        {
        new 
sspeed[50];
        new 
idvv[3];
        
//GetVehicleHealth( GetPlayerVehicleID(playerid), HP );
        
format(sspeedsizeof(sspeed), "%dKM/H"GetSpeed(playerid));
        
PlayerTextDrawSetString(playeridBRZINOMER[4][playerid], sspeed);
        
format(idvvsizeof(idvv), "%d"GetVehicleModel(GetPlayerVehicleID(playerid)));
        
PlayerTextDrawSetPreviewModel(playeridBRZINOMER[3][playerid], idvv);
        new 
FloatPos[4];
        
GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
        new 
keysudlr;
        
GetPlayerKeys(playeridkeysudlr);
        }
        }
        }
}

ERROR:
PHP код:
C:\Users\iwanmf\Desktop\San Exin Eldin\gamemodes\SE-RPG.pwn(20293) : error 035argument type mismatch (argument 3)
Pawn compiler 3.10.4              Copyright (c1997-2006ITB CompuPhase
1 Error
.
[
Finished in 3.1s with exit code 1]
[
cmd: ['pawncc.exe''-i includes''C:\\Users\\iwanmf\\Desktop\\San Exin - Eldin\\gamemodes\\SE-RPG.pwn''-d3''-Z+''-;+']]
[
dirC:\Users\iwanmf\Desktop\San Exin Eldin\gamemodes]
[
pathC:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\OpenVPN\bin;C:\Program Files\PuTTY\;C:\Users\iwanmf\AppData\Local\atom\bin;%DASHLANE_DLL_DIR%] 
Error on line:

PHP код:
PlayerTextDrawSetPreviewModel(playeridBRZINOMER[3][playerid], idvv); 
Reply
#2

1. use strcpy, not format to copy the model
pawn Код:
stock strcpy(dest[], const source[], maxlength=sizeof dest)
{
    strcat((dest[0] = EOS, dest), source, maxlength);
}
2. why is your variable an array?
Quote:

idvv[3]

It supposed to be an ID, an integer, you specify it in your format even.
(EDIT2: format produces string results, third argument accepts an integer)
Remove that []
EDIT:
3. Just noticed, why do you even use that? just do
pawn Код:
idvv=GetVehicleModel(GetPlayerVehicleID(playerid));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)