SA-MP Forums Archive
OnPlayerSelectedRow causes multiple 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerSelectedRow causes multiple errors (/showthread.php?tid=157082)



OnPlayerSelectedRow causes multiple errors - TheNuttyScientist - 05.07.2010

E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(176) : error 017: undefined symbol "strtok"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(176) : error 033: array must be indexed (variable "cmd")
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(192) : error 004: function "SendPlayerFormattedText" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(193) : error 004: function "SendPlayerFormattedText" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(194) : error 004: function "SendPlayerFormattedText" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(195) : error 004: function "SendPlayerFormattedText" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(216) : error 017: undefined symbol "strtok"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(216) : error 033: array must be indexed (variable "tmp")
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(224) : error 017: undefined symbol "strtok"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(224) : error 033: array must be indexed (variable "tmp")
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(174) : warning 203: symbol is never used: "idx"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(284) : warning 202: number of arguments does not match definition
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(284) : warning 202: number of arguments does not match definition
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(293) : error 029: invalid expression, assumed zero
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(293) : error 004: function "OnPlayerSpawn" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(297) : error 004: function "SetPlayerRandomSpawn" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(299) : error 079: inconsistent return types (array & non-array)
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(302) : warning 225: unreachable code
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(302) : error 029: invalid expression, assumed zero
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(302) : error 004: function "SetPlayerRandomSpawn" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(315) : error 079: inconsistent return types (array & non-array)
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(320) : warning 225: unreachable code
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(320) : error 029: invalid expression, assumed zero
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(320) : error 004: function "OnPlayerDeath" is not implemented
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(323) : error 017: undefined symbol "killerid"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(324) : error 017: undefined symbol "reason"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(327) : error 017: undefined symbol "killerid"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(32 : error 017: undefined symbol "killerid"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(331) : error 017: undefined symbol "killerid"
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(33 : error 079: inconsistent return types (array & non-array)
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(392) : warning 225: unreachable code
E:\SA-MP Server Making Kit\gamemodes\lvdmmg.pwn(392) : error 029: invalid expression, assumed zero

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


26 Errors.


Re: OnPlayerSelectedRow causes multiple errors - dice7 - 05.07.2010

You missed a bracket somewhere


Re: OnPlayerSelectedRow causes multiple errors - TheNuttyScientist - 05.07.2010

Oh okay.

Here's the code since this is my first time using this.

pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
    if(GetPlayerMenu(playerid) == Menu)
    {
    switch(row)
        {
        case 0:
        {
        SetPlayerPos(playerid,2081.1968,1232.8430,10.8203);
        TogglePlayerControllable(playerid, true);
        }

        case 1:
        {
        SetPlayerPos(playerid,1751.0615,-1594.7960,13.5410);
        TogglePlayerControllable(playerid, true);
        }

        case 2:
        {
        SetPlayerPos(playerid,-2153.8379,1051.2831,80.0000);
        TogglePlayerControllable(playerid, true);
        }
    }
}



Re: OnPlayerSelectedRow causes multiple errors - -Sneaky- - 05.07.2010

Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
    if(GetPlayerMenu(playerid) == Menu)
    {
    	switch(row)
        {
            case 0:
            {
                SetPlayerPos(playerid,2081.1968,1232.8430,10.8203);
        	TogglePlayerControllable(playerid, true);
            }

            case 1:
            {
                SetPlayerPos(playerid,1751.0615,-1594.7960,13.5410);
        	TogglePlayerControllable(playerid, true);
            }

            case 2:
            {
                SetPlayerPos(playerid,-2153.8379,1051.2831,80.0000);
        	TogglePlayerControllable(playerid, true);
    	    }
	}
	return 1;
}



Re: OnPlayerSelectedRow causes multiple errors - TheNuttyScientist - 05.07.2010

Quote:
Originally Posted by -Sneaky-
Посмотреть сообщение
Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
    if(GetPlayerMenu(playerid) == Menu)
    {
    	switch(row)
        {
        	case 0:
        	{
        	    SetPlayerPos(playerid,2081.1968,1232.8430,10.8203);
        	    TogglePlayerControllable(playerid, true);
        	}

        	case 1:
        	{
        	    SetPlayerPos(playerid,1751.0615,-1594.7960,13.5410);
        	    TogglePlayerControllable(playerid, true);
        	}

        	case 2:
        	{
        	    SetPlayerPos(playerid,-2153.8379,1051.2831,80.0000);
        	    TogglePlayerControllable(playerid, true);
        	}
    	    }
	}
	return 1;
}
Thank you very much mate.


Re: OnPlayerSelectedRow causes multiple errors - -Sneaky- - 05.07.2010

I made a small mistake! Check my previous post again.

If that doesn't work by the way the error is somewhere else, you probably missed or added a curly bracket somewhere then like Dice7 said.


Re: OnPlayerSelectedRow causes multiple errors - dice7 - 05.07.2010

Your code in the previous post is missing a closing bracket. Learn to indent code and you'll quickly find the missing one. Also the number of opening brackets must always match the number of closing ones


Re: OnPlayerSelectedRow causes multiple errors - TheNuttyScientist - 05.07.2010

Quote:
Originally Posted by -Sneaky-
Посмотреть сообщение
I made a small mistake! Check my previous post again.

If that doesn't work by the way the error is somewhere else, you probably missed or added a curly bracket somewhere then like Dice7 said.
It actually works just fine.