![]() |
gs2 debug error?
just testing what would happen i made this:
PHP Code:
yes i could just add if(weapon != NULL) but i wanted to see if gs2 would look for the function addweapon if no weapon was specified. this also happens to removeweapon this also happens if the weapon doesn't exist GraalScript: Function addweapon not found at line 5 in script of Sern (in level test.nw at pos (0, 0)) |
Your script is logically wrong. It is not erroring because the weapon is not found, it is erroring because it has not found a valid player object.
HTML Code:
function onActionServerSide(temp.acc, temp.weap)Quote:
|
Rick, it is kind of weird to use a temp. prefix on function parameters. Aren't they treated as temp variables automatically?
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
I would say onActionServerSide(temp.acc, temp.weap) is not correct because this would create temp.temp.acc or so, have not tested that though. temp. is just referring to the current callstack entry, so you could do onActionServerSide(acc, weap) and then access the parameters as "acc" or "temp.acc"
|
| All times are GMT +2. The time now is 01:56 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.