![]() |
serverside keyname() problem
#k(float) seems to be working fine serverside in this class (after it adds a kart to the player, it tells them which keys they should press to accelerate/brake):
NPC Code: works. It properly displays which keys are set (traditionally) to S and D. However, when I try to convert it to use keyname(float): NPC Code: it returns 0 now and causes this error: Quote:
|
at least you see what i mean, its errors like these that cause me to mix gs1 and gs2. As we all know, gs2 is still under development. Mostly, but not completely functional. I look forward to when gs2 works fully they way the wiki says its supposed to work.
To whoever is the one person writing the wiki, good work so far. If many people are writing the wiki, how do you know what to put in there? What is your resource and credentials to add to the gs2 parts of the wiki? |
Quote:
|
The new scripting engine is fully working, we are already using it on Graal Kingdoms, Zone, Era and Classic. I am helping for the wiki too.
About keyname(): it is a clientside-function, I have no idea why #k is working for you on serverside (and should not work since they keys are different for each client, otherwise we wouldn't need that function). The normal way is to save the keyname on clientside into some client. variable and then use that client. variable on serverside. About say2: it is better to use the format() function, the code looks much more readable then, like format("Press %s to jump!", client.Akey) |
Quote:
Also, that format() function brings back some fond C-memories :) |
Well we figured out the problem - in old scripting engine the #k thing is ignored on serverside, and if you pass it to the client with say2 then the client is filling the key name in once it displays the sign text.
In new scripting engine the server needs to compile the script, but doesn't provide the keyname functionality itself. So it only works in clientside scripts or if you just pass the text to the clientside (by using the new scripting version of say2 with say2("blabla #k")). |
| All times are GMT +2. The time now is 08:18 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.