SA-MP Forums Archive
I get a few errors I need help with. - 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: I get a few errors I need help with. (/showthread.php?tid=353917)



I get a few errors I need help with. - rangerxxll - 25.06.2012

Good evening. I'm trying to save a players position, and load it back up when they disconnect. But I get 4 errors on one line. Here's the line of code:
pawn Код:
INI_Float("PositionX",PosX[playerid]);
And the errors I'm getting.
Код:
C:\Users\Luke\Desktop\Roleplay\gamemodes\rp.pwn(52) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)")
C:\Users\Luke\Desktop\Roleplay\gamemodes\rp.pwn(220) : error 028: invalid subscript (not an array or too many subscripts): "PosX"
C:\Users\Luke\Desktop\Roleplay\gamemodes\rp.pwn(220) : error 029: invalid expression, assumed zero
C:\Users\Luke\Desktop\Roleplay\gamemodes\rp.pwn(220) : error 001: expected token: ";", but found ")"
C:\Users\Luke\Desktop\Roleplay\gamemodes\rp.pwn(220) : fatal error 107: too many error messages on one line
Is there something I'm missing/forgetting? Would love some help :P


Re: I get a few errors I need help with. - Makaveli93 - 25.06.2012

I'm not sure, but maybe like this

pawn Код:
INI_Float("PositionX=%f",PosX[playerid]);



Re: I get a few errors I need help with. - rangerxxll - 25.06.2012

Still get the same errors I'm afraid.


Re: I get a few errors I need help with. - Makaveli93 - 25.06.2012

Can you show me how you defined your variable? Example: new test; etc


Re: I get a few errors I need help with. - Scott - 25.06.2012

Post the full code to your INI_Float function/macro and the deceleration for the PosX variable.