SA-MP Forums Archive
Pawno Help! - 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: Pawno Help! (/showthread.php?tid=548707)



Pawno Help! - DarkScimitar - 01.12.2014

Hi Guys Im new to scripting please help me

Errors-

C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\GameMode.pwn (11 -- 12) : error 017: undefined symbol "Spawn_X"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\GameMode.pwn (11 -- 12) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\GameMode.pwn (15) : error 010: invalid function or declaration


whole code -

#include <a_samp>
#define GameMode "Tutorial"

public OnGameModeInit()
{
SetGameModeText("GameMode");
return 1;
}

public OnPlayerRequestClass(playerid,classid)
(
SetSpawnInfo(playerid, 0, 121, Spawn_X, Spawn_Y, Spawn_z, 0, -1,-1,-1,-1,-1,-1);
GivePlayerMoney(Playerid, 100)'
SpawnPlayer(Playerid);
return 1;
)


Re: Pawno Help! - Runn3R - 01.12.2014

You can't use "(" nor ")" as a bracket!

You use { }.

Please read some tutorials before you start scripting you can find alot of them on the forums.

Issue: ()
Fix: {}
Код:
public OnPlayerRequestClass(playerid,classid)
{
SetSpawnInfo(playerid, 0, 121, Spawn_X, Spawn_Y, Spawn_z, 0, -1,-1,-1,-1,-1,-1);
GivePlayerMoney(Playerid, 100);
SpawnPlayer(Playerid);
return 1;
}