Author Topic: A problem....  (Read 1158 times)

0 Members and 1 Guest are viewing this topic.

Offline MR-93

  • Major(1)
  • Posts: 15
A problem....
« on: April 18, 2008, 12:09:56 pm »
What is wrong?
Code: [Select]
procedure OnPlayerRespawn(ID: Byte)
begin
  SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),21);
end;
i got this error:
Code: [Select]
08-04-18 19:57:06  [*] Compiling mrzm -> awww.pas...
08-04-18 19:57:06  [*] mrzm -> [Error] (68:1): Semicolon (';') expected
i want get berserker when i respawn ;D

« Last Edit: April 18, 2008, 12:24:46 pm by MR-93 »

Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: A problem....
« Reply #1 on: April 18, 2008, 12:42:37 pm »
Hi!

You missed the semicolon after "procedure OnPlayerRespawn(ID: Byte)"  ;)
Try this:

procedure OnPlayerRespawn(ID: Byte);
begin
  SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),21);
end;

I'm sure it will work.

Greetings
Markus
« Last Edit: April 18, 2008, 01:08:30 pm by Markus Quär »
Soldat Global Account System: #soldat.sgas @ quakenet

Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: A problem....
« Reply #2 on: April 18, 2008, 02:14:05 pm »
No problem. One hand washes the other :P
Soldat Global Account System: #soldat.sgas @ quakenet

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: A problem....
« Reply #3 on: April 18, 2008, 10:11:21 pm »
One hand washes the other :P
[offtopic] Wow that is the best saying I have ever heard.
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline UPNPAD

  • Major(1)
  • Posts: 36
Re: A problem....
« Reply #4 on: April 20, 2008, 12:27:38 am »
Don't use SpawnObject, as it sometimes fails if you want to give someone a bonus. Use GiveBonus instead, as it actually gives the player a bonus rather than spawns a bonus where the player "is".

EDIT: Fixed the link.

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: A problem....
« Reply #5 on: April 20, 2008, 11:25:51 am »
now comes "berserker mode!" text on my screen but i dont have berserker mode  ???
are you trying to give it when the player is dead?

Offline UPNPAD

  • Major(1)
  • Posts: 36
Re: A problem....
« Reply #6 on: April 20, 2008, 07:27:18 pm »
Check if
Code: [Select]
GetPlayerStat(ID, 'alive') = true when giving the bonus.