SA-MP Forums Archive
Bug?? - 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: Bug?? (/showthread.php?tid=369711)



Bug?? - Sanady - 17.08.2012

Hello I got problems with this

pawn Код:
new Text:Zero[MAX_PLAYERS];

Zero[playerid] = TextDrawCreate(42.000000, 317.000000, "00000000");
    TextDrawBackgroundColor(Zero[playerid], 255);
    TextDrawFont(Zero[playerid], 3);
    TextDrawLetterSize(Zero[playerid], 0.539999, 2.299999);
    TextDrawColor(Zero[playerid], -86501633);
    TextDrawSetOutline(Zero[playerid], 1);
    TextDrawSetProportional(Zero[playerid], 1);
ERRORS

Код:
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(189) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(190) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(191) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(192) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(193) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(194) : error 017: undefined symbol "playerid"
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(195) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.



Re: Bug?? - DreamOnIt - 17.08.2012

Where did you write that code? In a function? Put all the code. You might have wrote that in a function where you don't pass playerid as a parameter


Re: Bug?? - Sanady - 17.08.2012

Quote:
Originally Posted by DreamOnIt
Посмотреть сообщение
Where did you write that code? In a function? Put all the code. You might have wrote that in a function where you don't pass playerid as a parameter
I putted it in OnGameModeInit......


Re: Bug?? - Rudy_ - 17.08.2012

Wrong
Add it OnPlayerConnect or Spawn


Re: Bug?? - DreamOnIt - 17.08.2012

You can't do that on OnGameModeInit, it's not the callback's function


Re: Bug?? - Sanady - 17.08.2012

Quote:
Originally Posted by DreamOnIt
Посмотреть сообщение
You can't do that on OnGameModeInit, it's not the callback's function
But When I delete "[playerid]"I get errors like

Код:
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(189) : error 033: array must be indexed (variable "Zero")
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(190) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(191) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(192) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(193) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(194) : error 035: argument type mismatch (argument 1)
D:\SWAT\samp03dsvr_win32(1)\gamemodes\Reg.pwn(195) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.



Re: Bug?? - DreamOnIt - 17.08.2012

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
Add it OnPlayerConnect or Spawn
This


Re: Bug?? - Sanady - 17.08.2012

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
Wrong
Add it OnPlayerConnect or Spawn
Aha lets see


Re: Bug?? - Sandiel - 17.08.2012

Do not delete 'playerid'
Copy paste the code exactly how it is and place it under OnPlayerConnect or OnPlayerSpawn, or any other callback that has "playerid" as a parameter in it, then compile, it'll be fine.