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



help, - WardenCS - 23.08.2009

hello,i got problem with gamemode,if someone logs in my server,then samp-server crashes.here is the gamemode
http://pastebin.com/m4366a492


no errors but few warnings

Quote:

C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\JDM.pwn(25 64) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\JDM.pwn(25 66) : warning 204: symbol is assigned a value that is never used: "string"
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\JDM.pwn(25 64) : warning 204: symbol is assigned a value that is never used: "tmp2"
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\JDM.pwn(25 64) : warning 204: symbol is assigned a value that is never used: "tmp"
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\JDM.pwn(25 64 -- 295 : warning 203: symbol is never used: "money"
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\JDM.pwn(25 64 -- 295 : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.




Re: help, - WardenCS - 23.08.2009

sorry for double post but...no one?oh cmon please


Re: help, - Khelif - 23.08.2009

http://pastebin.com/dbda7384


Re: help, - WardenCS - 23.08.2009

how to fix these

Quote:

C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\Untitledzz .pwn(1119) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\Untitledzz .pwn(1142) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\Ingrid\Desktop\Mafia\gamemodes\Untitledzz .pwn(230 : error 017: undefined symbol "IsNumeric"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.




Re: help, - Backwardsman97 - 23.08.2009

Add the IsNumeric function?


Re: help, - WardenCS - 23.08.2009

how?xD im n00b.


Re: help, - Backwardsman97 - 23.08.2009

pawn Код:
IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0')
        {
            return 0;
        }
    }
    return 1;
}
Add that some where in your script. :P


Re: help, - WardenCS - 23.08.2009

thanks for helping but...uh crap it crashes still please help:S


Re: help, - WardenCS - 24.08.2009

anyone please?


Re: help, - Energyzer - 24.08.2009

Mmm... try to do this on the line 2564.

Change this:
pawn Код:
new cmd[256], tmp[256], tmp2[256];
To this:
pawn Код:
new cmd[256];
new tmp[256];
new tmp2[256];
And tell me.


Re: help, - WardenCS - 24.08.2009

crap still,any more ideas?


Re: help, - RyDeR` - 24.08.2009

pawn Код:
#pragma unused ret_memcpy



Re: help, - RyDeR` - 24.08.2009

Sory for spam,

Delete "string", "tmp2", "tmp" In your mode.


Re: help, - WardenCS - 24.08.2009

np,but still craap any more ideas ?


Re: help, - MB@ - 24.08.2009

No more ideas


Re: help, - WardenCS - 24.08.2009

aww crap


Re: help, - Typhome - 24.08.2009

u sux, learn script :S

utils.inc
Код:
IsNumeric(const string[])
{
	for (new i = 0, j = strlen(string); i < j; i++)
	{
		if (string[i] > '9' || string[i] < '0') return 0;
	}
	return 1;
}
and top script
Код:
#include <utils>



Re: help, - Backwardsman97 - 24.08.2009

He's fixed that problem. It's crashing under the login command.