SA-MP Forums Archive
[Help] undefined symbol "playerid" - 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: [Help] undefined symbol "playerid" (/showthread.php?tid=288901)



[Help] undefined symbol "playerid" - ivanVU - 09.10.2011

hello,i am making gamemode,and i started to work on fuel system,and i put this..

Код:
	Speed4[playerid] = TextDrawCreate(493.000000, 413.000000, "Gorivo:");
	TextDrawBackgroundColor(Speed4[playerid], 255);
	TextDrawFont(Speed4[playerid], 2);
	TextDrawLetterSize(Speed4[playerid], 0.289999, 1.899999);
	TextDrawColor(Speed4[playerid], -1);
	TextDrawSetOutline(Speed4[playerid], 0);
	TextDrawSetProportional(Speed4[playerid], 1);
	TextDrawSetShadow(Speed4[playerid], 1);
and this error's

Код:
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(471) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(472) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(473) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(474) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(475) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(476) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(477) : error 017: undefined symbol "playerid"
C:\Users\Snjezana\Desktop\Ivanovo (nemoj brisat)\Cynix DM\gamemodes\CRP.pwn(478) : error 017: undefined symbol "playerid"
How can I solve this errors?

above all i have :


Код:
    for(new i=0;i<MAX_VEHICLES;i++)
	{
        fuel[i] = 40; 
    }



Re: [Help] undefined symbol "playerid" - Kush - 09.10.2011

Your attempting to use functions within a callback which arguments doesn't support "playerid".


Re: [Help] undefined symbol "playerid" - aRoach - 09.10.2011

pawn Код:
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
    Speed4[i] = TextDrawCreate(493.000000, 413.000000, "Gorivo:");
    TextDrawBackgroundColor(Speed4[i], 255);
    TextDrawFont(Speed4[i], 2);
    TextDrawLetterSize(Speed4[i], 0.289999, 1.899999);
    TextDrawColor(Speed4[i], -1);
    TextDrawSetOutline(Speed4[i], 0);
    TextDrawSetProportional(Speed4[i], 1);
    TextDrawSetShadow(Speed4[i], 1);
}



Re: [Help] undefined symbol "playerid" - GangsTa_ - 09.10.2011

Edit the 'Speed4[playerid]' variable into 'Text:Speed4' and change everywhere you got Speed4[playerid] to Text:Speed4.


Re: [Help] undefined symbol "playerid" - ivanVU - 09.10.2011

thank you..


Re: [Help] undefined symbol "playerid" - GangsTa_ - 09.10.2011

Works?


Re: [Help] undefined symbol "playerid" - ivanVU - 09.10.2011

yes,it works,thank you!