base.pwn question... - 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: base.pwn question... (
/showthread.php?tid=129788)
base.pwn question... -
RoneyRemington - 23.02.2010
ok in the base.pwn file that comes with the server there is a /pm ID (text) command. but if i add it into my gamemode i get 2 errors. any help
Re: base.pwn question... -
[cA]Unforseen - 23.02.2010
give the exact error
Re: base.pwn question... -
LuxurioN™ - 23.02.2010
What are the errors?
Re: base.pwn question... -
RoneyRemington - 23.02.2010
C:\Users\TJ's Server\Desktop\Server SA-MP\gamemodes\WEWFGRP.pwn(2901) : error 017: undefined symbol "strrest"
C:\Users\TJ's Server\Desktop\Server SA-MP\gamemodes\WEWFGRP.pwn(2901) : error 033: array must be indexed (variable "gMessage")
C:\Users\TJ's Server\Desktop\Server SA-MP\gamemodes\WEWFGRP.pwn(2930) : warning 209: function "OnPlayerCommandText" should return a value
Re: base.pwn question... -
LuxurioN™ - 23.02.2010
Add:
and:
pawn Код:
stock strrest(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[128];
while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
For end, add "return 0;" in end of your "OnPlayerCommandText"!