SA-MP Forums Archive
Where is the problem? - 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: Where is the problem? (/showthread.php?tid=111875)



Where is the problem? - Oregon_Science - 04.12.2009

Hi,

Where is the problem?
Errors:

Quote:

C:\Program Files\gamemodes\myserver.pwn(681) : error 022: must be lvalue (non-constant)
C:\Program Files\gamemodes\myserver.pwn(681) : warning 215: expression has no effect
C:\Program Files\gamemodes\myserver.pwn(681) : error 001: expected token: ";", but found ")"
C:\Program Files\gamemodes\myserver.pwn(681) : error 029: invalid expression, assumed zero
C:\Program Files\gamemodes\myserver.pwn(681) : fatal error 107: too many error messages on one line

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


4 Errors.

Script:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
    gClass[playerid] = classid;
   
    if(classid == 133 || classid == 134 || classid == 135) {
        GameTextForPlayer(playerid,"~g~Spawn 1",5000,5);
    } else if(classid == 140 || classid == 141 || classid = 142) {
      GameTextForPlayer(playerid,"~r~Spawn 2",5000,5);
    } else if(classid == 200 || classid == 201) {
        GameTextForPlayer(playerid,"~p~Spawn 3",5000,5);
    }
    return 1;
}



Re: Where is the problem? - Correlli - 04.12.2009

Quote:
Originally Posted by Oregon_Science
pawn Код:
else if(classid == 140 || classid == 141 || classid = 142)
pawn Код:
else if(classid == 140 || classid == 141 || classid == 142)



Re: Where is the problem? - Oregon_Science - 04.12.2009

Oh this st*** little details

Thanks!


Re: Where is the problem? - Oregon_Science - 04.12.2009

(Sorry for dubble post)

Hmmm after compiling all works fine. But when coming ingame i scroll between the classes and i see only
Spawn 1 and Spawn 3 (I mean gametext)
... and weird is also that it is like on a random skin (Like it doesn't look what skin it is, just gametext it)

:S


Re: Where is the problem? - Oregon_Science - 04.12.2009

And
Someone have an idea for it ?!?

Help me please


Re: Where is the problem? - Nero_3D - 04.12.2009

ah it shows the gametext for the right classids not for the skins
"Spawn 1" will be shown at class 133, 134, 135
"Spawn 2" at classid 140, 141, 142
"Spawn 3" at classid 200, 201

I think that you mixed up classid with skinid because for that you need to have more as 200 calls of AddPlayerClass