SA-MP Forums Archive
Error, help me. - 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: Error, help me. (/showthread.php?tid=294413)



Error, help me. - bartje01 - 01.11.2011

Hey all. I have a new error with my Loading user system.

pawn Код:
INI_Int("pCpUse",PlayerInfo[playerid][pCpUse]);
    INI_String("ScreenName",PlayerInfo[playerid][pScreenName]);
The second line is giving me an error
Код:
C:\Users\Lars\Desktop\Sa-mp\gamemodes\RPG.pwn(486) : error 017: undefined symbol "INI_String"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I'm using Y_Ini.

please help


Re: Error, help me. - i514x - 01.11.2011

INI_String is a define, if u give that function a wrong number of params, it won't work properly so the error is correct. Add a third parameter which will tell the function the size of PlayerInfo[playerid][pScreenName].


Re: Error, help me. - Wesley221 - 01.11.2011

INI_String needs the size behind it, otherwise it wont work like said above
pawn Код:
INI_String("ScreenName",PlayerInfo[playerid][pScreenName], SIZEHERE);



Re: Error, help me. - bartje01 - 01.11.2011

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
INI_String needs the size behind it, otherwise it wont work like said above
pawn Код:
INI_String("ScreenName",PlayerInfo[playerid][pScreenName], SIZEHERE);
I'm starting to understand. But it gives me this errors:

C:\Users\Lars\Desktop\Sa-mp\gamemodes\RPG.pwn(486) : error 001: expected token: ")", but found "["
C:\Users\Lars\Desktop\Sa-mp\gamemodes\RPG.pwn(486) : warning 215: expression has no effect
C:\Users\Lars\Desktop\Sa-mp\gamemodes\RPG.pwn(486) : error 001: expected token: ";", but found "]"
C:\Users\Lars\Desktop\Sa-mp\gamemodes\RPG.pwn(486) : error 029: invalid expression, assumed zero
C:\Users\Lars\Desktop\Sa-mp\gamemodes\RPG.pwn(486) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: Error, help me. - SmiT - 01.11.2011

What's the size of the "pScreenName" variable? And mind showing the line?


Re: Error, help me. - bartje01 - 01.11.2011

Quote:
Originally Posted by SmiT
Посмотреть сообщение
What's the size of the "pScreenName" variable? And mind showing the line?
I already understanded what you ment with this :P I had to put [20] at the variable. Thankyou