SA-MP Forums Archive
1 Line errors. - 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: 1 Line errors. (/showthread.php?tid=491621)



1 Line errors. - kubeba59 - 31.01.2014

Hey guys I have this errors:

pawn Код:
C:\Program Files\GTA San Andreass\Server\gamemodes\base.pwn(22380) : error 028: invalid subscript (not an array or too many subscripts): "index"
C:\Program Files\GTA San Andreass\Server\gamemodes\base.pwn(22380) : warning 215: expression has no effect
C:\Program Files\GTA San Andreass\Server\gamemodes\base.pwn(22380) : error 001: expected token: ";", but found "]"
C:\Program Files\GTA San Andreass\Server\gamemodes\base.pwn(22380) : error 029: invalid expression, assumed zero
C:\Program Files\GTA San Andreass\Server\gamemodes\base.pwn(22380) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Line:
pawn Код:
SetPlayerAttachedObject(playerid,index[0],modelid,boneid,fOffsetX[0],fOffsetY[0],fOffsetZ[0],fRotX[0],fRotY[0],fRotZ[0],fScaleX[0],fScaleY[0],fScaleZ[0]);



Re: 1 Line errors. - Misiur - 31.01.2014

What does your index variable look like? Is it an array/string? If not - you can't access [0] of it.


Re: 1 Line errors. - kubeba59 - 01.02.2014

This is:

pawn Код:
enum pInfo
{

    pindex[10],
        pmodelid,
    pboneid,
    Float:pfOffsetX[10],
    Float:pfOffsetY[10],
    Float:pfOffsetZ[10],
    Float:pfRotX[10],
    Float:pfRotY[10],
    Float:pfRotZ[10],
    Float:pfScaleX[10],
    Float:pfScaleY[10],
    Float:pfScaleZ[10],
}